Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update GitHub Actions CI #740

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 21 additions & 53 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
profile: minimal
override: true
- name: Check
uses: actions-rs/cargo@v1
with:
command: check
args: --workspace --all-features --all-targets
run: cargo check --workspace --all-features --all-targets

check-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
profile: minimal
- name: cargo doc
working-directory: ${{ matrix.subcrate }}
env:
Expand All @@ -45,36 +39,27 @@ jobs:
steps:
- uses: actions/checkout@master
- name: "install Rust ${{ env.MSRV }}"
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.MSRV }}
profile: minimal
- name: "install Rust nightly"
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
profile: minimal
- name: Select minimal versions
uses: actions-rs/cargo@v1
with:
command: update
args: -Z minimal-versions
toolchain: nightly
run: cargo update -Z minimal-versions
- name: Check
uses: actions-rs/cargo@v1
with:
command: check
args: --all --all-targets --all-features --locked
toolchain: ${{ env.MSRV }}
run: |
rustup default ${{ env.MSRV }}
cargo check --all --all-targets --all-features --locked

cargo-hack:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
profile: minimal
- name: install cargo-hack
uses: taiki-e/install-action@cargo-hack
- name: cargo hack check
Expand All @@ -95,66 +80,49 @@ jobs:
steps:
- uses: actions/checkout@master
- name: "install Rust ${{ matrix.rust }}"
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --all-features
run: cargo test --workspace --all-features

test-msrv:
needs: check-msrv
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: "install Rust ${{ env.MSRV }}"
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.MSRV }}
profile: minimal
- name: "install Rust nightly"
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
profile: minimal
- name: Select minimal versions
uses: actions-rs/cargo@v1
with:
command: update
args: -Z minimal-versions
toolchain: nightly
run: cargo update -Z minimal-versions
- name: test
uses: actions-rs/cargo@v1
with:
command: check
args: --workspace --all-features --locked
toolchain: ${{ env.MSRV }}
run: |
rustup default ${{ env.MSRV }}
cargo check --workspace --all-features --locked

style:
needs: check-stable
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt
profile: minimal
- name: rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: cargo fmt --all -- --check

deny-check:
name: cargo-deny check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check
13 changes: 3 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,13 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v1
uses: actions/checkout@v4
- name: Install nightly Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
profile: minimal
- name: Generate documentation
uses: actions-rs/cargo@v1
with:
command: doc
args: --workspace --no-deps --all-features
# Tower uses nightly-only RustDoc features
toolchain: nightly
run: cargo doc --workspace --no-deps --all-features
env:
# Enable the RustDoc `#[doc(cfg(...))]` attribute.
RUSTDOCFLAGS: --cfg docsrs
Expand All @@ -36,4 +30,3 @@ jobs:
build_dir: target/doc
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
if: github.repository_owner == 'tower-rs'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: taiki-e/[email protected]
with:
prefix: "(tower)|(tower-[a-z]+)"
Expand Down