From 1533de3c80127297494ca04e8cd22cf595d0c074 Mon Sep 17 00:00:00 2001 From: Mendelt Siebenga Date: Sun, 12 Mar 2023 16:44:05 +0100 Subject: [PATCH] update ci workflows to not use actions-rs --- .github/workflows/ci.yml | 52 ++++++++--------------------------- .github/workflows/publish.yml | 11 ++------ 2 files changed, 14 insertions(+), 49 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5953991..e0409b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,49 +12,25 @@ jobs: name: Rust fmt runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - run: rustup component add rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@stable + - run: cargo fmt --all -- --check check: name: A quick check for warnings runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - name: set rust options to fail on warnings - run: echo "RUSTFLAGS=-D warnings" >> $GITHUB_ENV - - uses: actions-rs/cargo@v1 - with: - command: check + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@stable + - run: cargo clippy --all --all-features -- -D warnings clippy: name: Run clippy runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - name: set rust options to fail on warnings - run: echo "RUSTFLAGS=-D warnings" >> $GITHUB_ENV - - uses: actions-rs/cargo@v1 - with: - command: clippy + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@stable + - run: cargo clippy --all --all-features -- -D warnings test: name: Test @@ -66,12 +42,8 @@ jobs: - beta - 1.56.0 steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: ${{ matrix.rust }} - override: true - - uses: actions-rs/cargo@v1 - with: - command: test + - run: cargo test --all --all-features diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2d5db12..c17f3da 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -14,14 +14,7 @@ jobs: uses: actions/checkout@v3 - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true + uses: dtolnay/rust-toolchain@stable - name: Publish - uses: actions-rs/cargo@v1 - with: - command: publish - args: --verbose --all-features --token ${{ secrets.CRATES_IO_TOKEN }} + run: cargo publish --verbose --all-features --token ${{ secrets.CRATES_IO_TOKEN }}