Skip to content

Commit 2b89a7f

Browse files
committed
Update tools used in CI
This should fix the `coverage` job.
1 parent ae0c9a7 commit 2b89a7f

File tree

2 files changed

+29
-45
lines changed

2 files changed

+29
-45
lines changed

.github/workflows/audit.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
security_audit:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v3
1515
- uses: actions-rs/audit-check@35b7b53b1e25b55642157ac01b4adceb5b9ebef3
1616
with:
1717
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yaml

+28-44
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,21 @@ jobs:
3333

3434
steps:
3535
- name: checkout
36-
uses: actions/checkout@v2
36+
uses: actions/checkout@v3
3737

38-
- name: Install Rust
39-
uses: actions-rs/toolchain@v1
38+
- name: Install Rust ${{ matrix.rust }}
39+
uses: dtolnay/rust-toolchain@master
4040
with:
4141
toolchain: ${{ matrix.rust }}
42-
default: true
43-
profile: minimal
4442

4543
- name: Install Python
46-
uses: actions/setup-python@v2
44+
uses: actions/setup-python@v4
4745
with:
4846
python-version: ${{ matrix.python-version }}
4947
architecture: x64
5048

5149
- name: Restore cache
52-
uses: Swatinem/rust-cache@v1
50+
uses: Swatinem/rust-cache@v2
5351

5452
- name: Build & test
5553
run: cargo test --all-features
@@ -93,15 +91,10 @@ jobs:
9391
runs-on: ubuntu-latest
9492
steps:
9593
- name: checkout
96-
uses: actions/checkout@v2
94+
uses: actions/checkout@v3
9795

9896
- name: Install Rust
99-
uses: actions-rs/toolchain@v1
100-
with:
101-
profile: minimal
102-
toolchain: stable
103-
default: true
104-
components: rustfmt
97+
uses: dtolnay/rust-toolchain@stable
10598

10699
- run: cargo fmt --all -- --check
107100

@@ -110,16 +103,13 @@ jobs:
110103
runs-on: ubuntu-latest
111104
steps:
112105
- name: checkout
113-
uses: actions/checkout@v2
106+
uses: actions/checkout@v3
114107

115-
- name: Install Rust
116-
uses: actions-rs/toolchain@v1
117-
with:
118-
toolchain: stable
119-
default: true
108+
- name: Install Rust stable
109+
uses: dtolnay/rust-toolchain@stable
120110

121111
- name: Restore cache
122-
uses: Swatinem/rust-cache@v1
112+
uses: Swatinem/rust-cache@v2
123113

124114
- name: Check links
125115
run: cargo rustdoc --all-features -- -D warnings
@@ -129,18 +119,13 @@ jobs:
129119
runs-on: ubuntu-latest
130120
steps:
131121
- name: Checkout repository
132-
uses: actions/checkout@v2
122+
uses: actions/checkout@v3
133123

134-
- name: Install Rust
135-
uses: actions-rs/toolchain@v1
136-
with:
137-
toolchain: stable
138-
profile: minimal
139-
default: true
140-
components: clippy
124+
- name: Install Rust stable
125+
uses: dtolnay/rust-toolchain@stable
141126

142127
- name: Restore cache
143-
uses: Swatinem/rust-cache@v1
128+
uses: Swatinem/rust-cache@v2
144129

145130
- name: Run clippy linter
146131
run: cargo clippy --all --tests -- -D clippy::all -D warnings
@@ -150,31 +135,30 @@ jobs:
150135
runs-on: ubuntu-latest
151136
steps:
152137
- name: Checkout repository
153-
uses: actions/checkout@v2
138+
uses: actions/checkout@v3
154139

155-
- name: Install Rust
156-
uses: actions-rs/toolchain@v1
157-
with:
158-
toolchain: nightly
159-
profile: minimal
160-
default: true
140+
- name: Install Rust nightly
141+
uses: dtolnay/rust-toolchain@nightly
161142

162143
- name: Restore cache
163-
uses: Swatinem/rust-cache@v1
144+
uses: Swatinem/rust-cache@v2
145+
146+
- name: Download cargo-tarpaulin from the GitHub releases
147+
run: |
148+
mkdir -p "${HOME}/.local/bin"
149+
curl -sL https://github.com/xd009642/tarpaulin/releases/download/0.24.0/cargo-tarpaulin-x86_64-unknown-linux-gnu.tar.gz | tar xvz -C "${HOME}/.local/bin"
150+
echo "$HOME/.local/bin" >> $GITHUB_PATH
164151
165152
- name: Run cargo-tarpaulin
166-
uses: actions-rs/[email protected]
167-
with:
168-
args: '--all-features --run-types Doctests,Tests'
169-
timeout: 120
153+
run: cargo tarpaulin --all-features --run-types Doctests,Tests --out Xml
170154

171155
- name: Upload to codecov.io
172-
uses: codecov/codecov-action@239febf655bba88b16ff5dea1d3135ea8663a1f9
156+
uses: codecov/codecov-action@v3
173157
with:
174158
token: ${{ secrets.CODECOV_TOKEN }}
175159

176160
- name: Archive code coverage results
177-
uses: actions/upload-artifact@v2
161+
uses: actions/upload-artifact@v3
178162
with:
179163
name: code-coverage-report
180164
path: cobertura.xml

0 commit comments

Comments
 (0)