Skip to content

Commit a6e98a7

Browse files
authoredJul 23, 2024
chore: update GitHub Actions CI (#740)
1 parent 74e925d commit a6e98a7

File tree

3 files changed

+25
-64
lines changed

3 files changed

+25
-64
lines changed
 

‎.github/workflows/CI.yml

+21-53
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,19 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@master
18-
- uses: actions-rs/toolchain@v1
18+
- uses: dtolnay/rust-toolchain@master
1919
with:
2020
toolchain: stable
21-
profile: minimal
22-
override: true
2321
- name: Check
24-
uses: actions-rs/cargo@v1
25-
with:
26-
command: check
27-
args: --workspace --all-features --all-targets
22+
run: cargo check --workspace --all-features --all-targets
2823

2924
check-docs:
3025
runs-on: ubuntu-latest
3126
steps:
3227
- uses: actions/checkout@master
33-
- uses: actions-rs/toolchain@v1
28+
- uses: dtolnay/rust-toolchain@master
3429
with:
3530
toolchain: stable
36-
profile: minimal
3731
- name: cargo doc
3832
working-directory: ${{ matrix.subcrate }}
3933
env:
@@ -45,36 +39,27 @@ jobs:
4539
steps:
4640
- uses: actions/checkout@master
4741
- name: "install Rust ${{ env.MSRV }}"
48-
uses: actions-rs/toolchain@v1
42+
uses: dtolnay/rust-toolchain@master
4943
with:
5044
toolchain: ${{ env.MSRV }}
51-
profile: minimal
5245
- name: "install Rust nightly"
53-
uses: actions-rs/toolchain@v1
46+
uses: dtolnay/rust-toolchain@master
5447
with:
5548
toolchain: nightly
56-
profile: minimal
5749
- name: Select minimal versions
58-
uses: actions-rs/cargo@v1
59-
with:
60-
command: update
61-
args: -Z minimal-versions
62-
toolchain: nightly
50+
run: cargo update -Z minimal-versions
6351
- name: Check
64-
uses: actions-rs/cargo@v1
65-
with:
66-
command: check
67-
args: --all --all-targets --all-features --locked
68-
toolchain: ${{ env.MSRV }}
52+
run: |
53+
rustup default ${{ env.MSRV }}
54+
cargo check --all --all-targets --all-features --locked
6955
7056
cargo-hack:
7157
runs-on: ubuntu-latest
7258
steps:
7359
- uses: actions/checkout@master
74-
- uses: actions-rs/toolchain@v1
60+
- uses: dtolnay/rust-toolchain@master
7561
with:
7662
toolchain: stable
77-
profile: minimal
7863
- name: install cargo-hack
7964
uses: taiki-e/install-action@cargo-hack
8065
- name: cargo hack check
@@ -95,66 +80,49 @@ jobs:
9580
steps:
9681
- uses: actions/checkout@master
9782
- name: "install Rust ${{ matrix.rust }}"
98-
uses: actions-rs/toolchain@v1
83+
uses: dtolnay/rust-toolchain@master
9984
with:
10085
toolchain: ${{ matrix.rust }}
101-
profile: minimal
102-
override: true
10386
- name: Run tests
104-
uses: actions-rs/cargo@v1
105-
with:
106-
command: test
107-
args: --workspace --all-features
87+
run: cargo test --workspace --all-features
10888

10989
test-msrv:
11090
needs: check-msrv
11191
runs-on: ubuntu-latest
11292
steps:
11393
- uses: actions/checkout@master
11494
- name: "install Rust ${{ env.MSRV }}"
115-
uses: actions-rs/toolchain@v1
95+
uses: dtolnay/rust-toolchain@master
11696
with:
11797
toolchain: ${{ env.MSRV }}
118-
profile: minimal
11998
- name: "install Rust nightly"
120-
uses: actions-rs/toolchain@v1
99+
uses: dtolnay/rust-toolchain@master
121100
with:
122101
toolchain: nightly
123-
profile: minimal
124102
- name: Select minimal versions
125-
uses: actions-rs/cargo@v1
126-
with:
127-
command: update
128-
args: -Z minimal-versions
129-
toolchain: nightly
103+
run: cargo update -Z minimal-versions
130104
- name: test
131-
uses: actions-rs/cargo@v1
132-
with:
133-
command: check
134-
args: --workspace --all-features --locked
135-
toolchain: ${{ env.MSRV }}
105+
run: |
106+
rustup default ${{ env.MSRV }}
107+
cargo check --workspace --all-features --locked
136108
137109
style:
138110
needs: check-stable
139111
runs-on: ubuntu-latest
140112
steps:
141113
- uses: actions/checkout@master
142-
- uses: actions-rs/toolchain@v1
114+
- uses: dtolnay/rust-toolchain@master
143115
with:
144116
toolchain: stable
145117
components: rustfmt
146-
profile: minimal
147118
- name: rustfmt
148-
uses: actions-rs/cargo@v1
149-
with:
150-
command: fmt
151-
args: --all -- --check
119+
run: cargo fmt --all -- --check
152120

153121
deny-check:
154122
name: cargo-deny check
155123
runs-on: ubuntu-latest
156124
steps:
157-
- uses: actions/checkout@v1
125+
- uses: actions/checkout@v4
158126
- uses: EmbarkStudios/cargo-deny-action@v1
159127
with:
160128
command: check

‎.github/workflows/publish.yml

+3-10
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,13 @@ jobs:
1212

1313
steps:
1414
- name: Checkout code
15-
uses: actions/checkout@v1
15+
uses: actions/checkout@v4
1616
- name: Install nightly Rust
17-
uses: actions-rs/toolchain@v1
17+
uses: dtolnay/rust-toolchain@master
1818
with:
1919
toolchain: nightly
20-
profile: minimal
2120
- name: Generate documentation
22-
uses: actions-rs/cargo@v1
23-
with:
24-
command: doc
25-
args: --workspace --no-deps --all-features
26-
# Tower uses nightly-only RustDoc features
27-
toolchain: nightly
21+
run: cargo doc --workspace --no-deps --all-features
2822
env:
2923
# Enable the RustDoc `#[doc(cfg(...))]` attribute.
3024
RUSTDOCFLAGS: --cfg docsrs
@@ -36,4 +30,3 @@ jobs:
3630
build_dir: target/doc
3731
env:
3832
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39-

‎.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
if: github.repository_owner == 'tower-rs'
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v4
1717
- uses: taiki-e/create-gh-release-action@v1.3.0
1818
with:
1919
prefix: "(tower)|(tower-[a-z]+)"

0 commit comments

Comments
 (0)