Skip to content

Commit 0de7c50

Browse files
(ci): replace archived actions-rs actions (#324)
Signed-off-by: krisztianfekete <git@krisztianfekete.org>
1 parent 79c8805 commit 0de7c50

1 file changed

Lines changed: 13 additions & 45 deletions

File tree

.github/workflows/rust.yml

Lines changed: 13 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@ jobs:
1212
with:
1313
repo-token: ${{ secrets.GITHUB_TOKEN }}
1414
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
15-
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
15+
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
1616
with:
17-
profile: minimal
1817
toolchain: stable
19-
override: true
2018

2119
# Install prometheus_client python library.
2220
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
@@ -36,15 +34,9 @@ jobs:
3634
path: ~/.cargo/git
3735
key: cargo-index-${{ hashFiles('Cargo.toml') }}
3836

39-
- uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # v1.0.1
40-
with:
41-
command: check
42-
args: --locked
37+
- run: cargo check --locked
4338

44-
- uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # v1.0.1
45-
with:
46-
command: test
47-
args: --locked --benches --all-features
39+
- run: cargo test --locked --benches --all-features
4840

4941
test:
5042
name: Test Suite
@@ -55,11 +47,9 @@ jobs:
5547
with:
5648
repo-token: ${{ secrets.GITHUB_TOKEN }}
5749
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
58-
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
50+
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
5951
with:
60-
profile: minimal
6152
toolchain: stable
62-
override: true
6353

6454
# Install prometheus_client python library.
6555
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
@@ -79,30 +69,18 @@ jobs:
7969
path: ~/.cargo/git
8070
key: cargo-index-${{ hashFiles('Cargo.toml') }}
8171

82-
- uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # v1.0.1
83-
with:
84-
command: test
85-
args: --locked --all --all-features
72+
- run: cargo test --locked --all --all-features
8673

8774
fmt:
8875
name: Rustfmt
8976
runs-on: ubuntu-latest
9077
steps:
91-
- name: Install Protoc
92-
uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
93-
with:
94-
repo-token: ${{ secrets.GITHUB_TOKEN }}
9578
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
96-
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
79+
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
9780
with:
98-
profile: minimal
9981
toolchain: stable
100-
override: true
101-
- run: rustup component add rustfmt
102-
- uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # v1.0.1
103-
with:
104-
command: fmt
105-
args: --all -- --check
82+
components: rustfmt
83+
- run: cargo fmt --all -- --check
10684

10785
clippy:
10886
name: Clippy
@@ -113,12 +91,10 @@ jobs:
11391
with:
11492
repo-token: ${{ secrets.GITHUB_TOKEN }}
11593
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
116-
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
94+
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
11795
with:
118-
profile: minimal
11996
toolchain: stable
120-
override: true
121-
- run: rustup component add clippy
97+
components: clippy
12298

12399
# Caching
124100
- name: Cache cargo registry
@@ -132,10 +108,7 @@ jobs:
132108
path: ~/.cargo/git
133109
key: cargo-index-${{ hashFiles('Cargo.toml') }}
134110

135-
- uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # v1.0.1
136-
with:
137-
command: clippy
138-
args: --locked --workspace --all-targets -- -D warnings
111+
- run: cargo clippy --locked --workspace --all-targets -- -D warnings
139112

140113
check-rustdoc-links:
141114
name: Check rustdoc intra-doc links
@@ -146,17 +119,12 @@ jobs:
146119
with:
147120
repo-token: ${{ secrets.GITHUB_TOKEN }}
148121
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
149-
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
122+
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
150123
with:
151-
profile: minimal
152124
toolchain: stable
153-
override: true
154-
- uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # v1.0.1
125+
- run: cargo doc --locked --verbose --workspace --no-deps --document-private-items --all-features
155126
env:
156127
RUSTDOCFLAGS: "--deny broken_intra_doc_links"
157-
with:
158-
command: doc
159-
args: --locked --verbose --workspace --no-deps --document-private-items --all-features
160128

161129
cross-compile:
162130
name: Cross compile

0 commit comments

Comments
 (0)