From b0256d712005a430b74afbb5b8b859ca7a1b05bc Mon Sep 17 00:00:00 2001 From: Ulyssa Date: Sun, 28 May 2023 21:37:42 -0700 Subject: [PATCH] Replace GitHub actions using deprecated features (#114) --- .github/workflows/ci.yml | 47 +++++++++++----------------------------- src/windows/room/chat.rs | 2 +- 2 files changed, 14 insertions(+), 35 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f2134edb..fd59f0b82 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,25 +9,6 @@ on: name: CI jobs: - clippy_check: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - submodules: true - - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - components: clippy - override: true - - name: Check Clippy - uses: actions-rs/clippy-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - toolchain: stable - args: test: strategy: matrix: @@ -38,12 +19,12 @@ jobs: uses: actions/checkout@v3 with: submodules: true - - name: Install Rust - uses: actions-rs/toolchain@v1 + - name: Install Rust (1.66 w/ clippy) + uses: dtolnay/rust-toolchain@1.66 with: - toolchain: nightly - override: true - components: rustfmt, clippy + components: clippy + - name: Install Rust (nightly w/ rustfmt) + run: rustup toolchain install nightly --component rustfmt - name: Cache cargo registry uses: actions/cache@v3 with: @@ -55,19 +36,17 @@ jobs: path: target key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }} - name: Check formatting - uses: actions-rs/cargo@v1 + run: cargo +nightly fmt --all -- --check + - name: Check Clippy + if: matrix.platform == 'ubuntu-latest' + uses: giraffate/clippy-action@v1 with: - command: fmt - args: --all -- --check + github_token: ${{ secrets.GITHUB_TOKEN }} + reporter: 'github-check' - name: Run tests - uses: actions-rs/cargo@v1 - with: - command: test + run: cargo test - name: Build artifacts - uses: actions-rs/cargo@v1 - with: - command: build - args: '--release' + run: cargo build --release - name: Upload artifacts uses: actions/upload-artifact@master with: diff --git a/src/windows/room/chat.rs b/src/windows/room/chat.rs index e06d414c1..280831072 100644 --- a/src/windows/room/chat.rs +++ b/src/windows/room/chat.rs @@ -489,7 +489,7 @@ impl ChatState { .map_err(IambError::from)?; let mime = mime::IMAGE_PNG; - let name = Cow::from(format!("Clipboard.png")); + let name = "Clipboard.png"; let config = AttachmentConfig::new(); let resp = room