Merge pull request #883 from andros21/master

Solve CI warnings replacing outdated actions
This commit is contained in:
Waffle Maybe 2023-06-01 15:04:15 +00:00 committed by GitHub
commit 92289c352b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,33 +53,29 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Install Rust ${{ env.rust_nightly }} - name: Install Rust ${{ env.rust_nightly }}
uses: actions-rs/toolchain@v1 uses: dtolnay/rust-toolchain@master
with: with:
profile: minimal
toolchain: ${{ env.rust_nightly }} toolchain: ${{ env.rust_nightly }}
override: true
components: rustfmt components: rustfmt
- name: Cache Dependencies - name: Cache Dependencies
uses: Swatinem/rust-cache@v1 uses: Swatinem/rust-cache@v2
- name: Check formatting - name: Check formatting
uses: actions-rs/cargo@v1 run: |
with: cargo fmt --all -- --check
command: fmt
args: --all -- --check
test: test:
name: Test name: Test
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
rust: rust:
- stable - stable
- beta - beta
- nightly - nightly
- msrv - msrv
include: include:
- rust: stable - rust: stable
toolchain: stable toolchain: stable
@ -94,26 +90,22 @@ jobs:
toolchain: 1.64.0 toolchain: 1.64.0
features: "--features full" features: "--features full"
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Install Rust ${{ matrix.toolchain }} - name: Install Rust ${{ matrix.toolchain }}
uses: actions-rs/toolchain@v1 uses: dtolnay/rust-toolchain@master
with: with:
profile: minimal
toolchain: ${{ matrix.toolchain }} toolchain: ${{ matrix.toolchain }}
override: true
- name: Cache Dependencies - name: Cache Dependencies
uses: Swatinem/rust-cache@v1 uses: Swatinem/rust-cache@v2
# NB. Don't test (build) examples so we can use non-msrv features in them (--tests/--doc) # NB. Don't test (build) examples so we can use non-msrv features in them (--tests/--doc)
- name: Compile - name: Compile
uses: actions-rs/cargo@v1 run: |
with: cargo +${{ matrix.toolchain }} test --tests --no-run --verbose ${{ matrix.features }}
command: test
args: --tests --no-run --verbose ${{ matrix.features }}
- name: Setup redis - name: Setup redis
run: | run: |
@ -121,19 +113,15 @@ jobs:
redis-server --port 7777 > /dev/null & redis-server --port 7777 > /dev/null &
redis-server --port 7778 > /dev/null & redis-server --port 7778 > /dev/null &
redis-server --port 7779 > /dev/null & redis-server --port 7779 > /dev/null &
- name: Test unit & integration tests - name: Test unit & integration tests
uses: actions-rs/cargo@v1 run: |
with: cargo +${{ matrix.toolchain }} test --tests --verbose ${{ matrix.features }}
command: test
args: --tests --verbose ${{ matrix.features }}
- name: Test documentation tests - name: Test documentation tests
if: ${{ matrix.rust != 'msrv' }} if: ${{ matrix.rust != 'msrv' }}
uses: actions-rs/cargo@v1 run: |
with: cargo +${{ matrix.toolchain }} test --doc --verbose ${{ matrix.features }}
command: test
args: --doc --verbose ${{ matrix.features }}
check-examples: check-examples:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -143,27 +131,21 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Install Rust stable - name: Install Rust stable
uses: actions-rs/toolchain@v1 uses: dtolnay/rust-toolchain@master
with: with:
profile: minimal
toolchain: stable toolchain: stable
override: true
- name: Cache Dependencies - name: Cache Dependencies
uses: Swatinem/rust-cache@v1 uses: Swatinem/rust-cache@v2
- name: Check examples - name: Check examples
uses: actions-rs/cargo@v1 run: |
with: cargo +stable check --examples --features full
command: check
args: --examples --features full
# TODO: prolly move it to a separate step? # TODO: prolly move it to a separate step?
- name: Check with no default features - name: Check with no default features
uses: actions-rs/cargo@v1 run: |
with: cargo +stable check --no-default-features
command: check
args: --no-default-features
clippy: clippy:
name: Run linter name: Run linter
@ -174,21 +156,17 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Install Rust ${{ env.rust_nightly }} - name: Install Rust ${{ env.rust_nightly }}
uses: actions-rs/toolchain@v1 uses: dtolnay/rust-toolchain@master
with: with:
profile: minimal
toolchain: ${{ env.rust_nightly }} toolchain: ${{ env.rust_nightly }}
override: true
components: clippy components: clippy
- name: Cache Dependencies - name: Cache Dependencies
uses: Swatinem/rust-cache@v1 uses: Swatinem/rust-cache@v2
- name: clippy - name: clippy
uses: actions-rs/cargo@v1 run: |
with: cargo clippy --all-targets --features "full nightly"
command: clippy
args: --all-targets --features "full nightly"
doc: doc:
name: check docs name: check docs
@ -199,16 +177,13 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Install Rust ${{ env.rust_nightly }} - name: Install Rust ${{ env.rust_nightly }}
uses: actions-rs/toolchain@v1 uses: dtolnay/rust-toolchain@master
with: with:
profile: minimal
toolchain: ${{ env.rust_nightly }} toolchain: ${{ env.rust_nightly }}
override: true
- name: Cache Dependencies - name: Cache Dependencies
uses: Swatinem/rust-cache@v1 uses: Swatinem/rust-cache@v2
- name: rustdoc - name: rustdoc
uses: actions-rs/cargo@v1 run: |
with: cargo docs # from .cargo/config.toml
command: docs # from .cargo/config.toml