mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-22 06:45:37 +01:00
Solve CI warnings replacing outdated actions
This commit is contained in:
parent
06595cef79
commit
00f382e8b9
1 changed files with 34 additions and 58 deletions
78
.github/workflows/ci.yml
vendored
78
.github/workflows/ci.yml
vendored
|
@ -53,21 +53,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: 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
|
||||||
|
@ -99,21 +95,17 @@ jobs:
|
||||||
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: |
|
||||||
|
@ -123,17 +115,13 @@ jobs:
|
||||||
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,22 @@ 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
|
||||||
|
id: toolchain
|
||||||
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 +${{ steps.toolchain.outputs.name }} 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 +${{ steps.toolchain.outputs.name }} check --no-default-features
|
||||||
command: check
|
|
||||||
args: --no-default-features
|
|
||||||
|
|
||||||
clippy:
|
clippy:
|
||||||
name: Run linter
|
name: Run linter
|
||||||
|
@ -174,21 +157,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 +178,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
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue