Skip to content

Commit dbe60a4

Browse files
authored
Replace unmaintained/outdated GitHub Actions (servo#811)
Updates all GitHub Actions and replaces the unmaintained `actions-rs` actions with `dtolnay/rust-toolchain`, `taiki-e/install-action` and plain cargo commands.
1 parent 1a4492c commit dbe60a4

File tree

2 files changed

+22
-51
lines changed

2 files changed

+22
-51
lines changed

.github/workflows/codecov.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,16 @@ jobs:
99
coverage:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v1
13-
- uses: actions-rs/toolchain@v1
12+
- uses: actions/checkout@v3
13+
- uses: dtolnay/rust-toolchain@stable
14+
- uses: taiki-e/install-action@v2
1415
with:
15-
profile: minimal
16-
toolchain: stable
17-
override: true
18-
- uses: actions-rs/tarpaulin@v0.1
19-
- uses: codecov/codecov-action@v2.1.0
16+
tool: cargo-tarpaulin
17+
- run: cargo tarpaulin --out Xml
18+
- uses: codecov/codecov-action@v3
2019
# A codecov token is not needed for public repos if the repo is linked
2120
# on codecov.io. See https://docs.codecov.com/docs/frequently-asked-questions#where-is-the-repository-upload-token-found
22-
- uses: actions/upload-artifact@v1
21+
- uses: actions/upload-artifact@v2
2322
with:
2423
name: code-coverage-report
2524
path: cobertura.xml

.github/workflows/main.yml

Lines changed: 15 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -29,75 +29,47 @@ jobs:
2929
runs-on: ${{ matrix.os }}
3030

3131
steps:
32-
- uses: actions/checkout@v2
33-
- uses: actions-rs/toolchain@v1
32+
- uses: actions/checkout@v3
33+
- uses: dtolnay/rust-toolchain@master
3434
with:
35-
profile: minimal
3635
toolchain: ${{ matrix.rust }}
37-
override: true
38-
- uses: actions-rs/cargo@v1
39-
with:
40-
command: build
41-
args: --all-targets
36+
- run: cargo build --all-targets
4237
# Run tests
4338
- name: Run tests
44-
uses: actions-rs/cargo@v1
45-
with:
46-
command: test
39+
run: cargo test
4740
# Run tests enabling the serde feature
4841
- name: Run tests with the serde feature
49-
uses: actions-rs/cargo@v1
50-
with:
51-
command: test
52-
args: --features "url/serde,url/expose_internals"
42+
run: cargo test --features "url/serde,url/expose_internals"
5343
# The #[debugger_visualizer] attribute is currently gated behind an unstable feature flag.
5444
# In order to test the visualizers for the url crate, they have to be tested on a nightly build.
5545
- name: Run debugger_visualizer tests
5646
if: |
5747
matrix.os == 'windows-latest' &&
5848
matrix.rust == 'nightly'
59-
uses: actions-rs/cargo@v1
60-
with:
61-
command: test
62-
args: --test debugger_visualizer --features "url/serde,url/debugger_visualizer" -- --test-threads=1
49+
run: cargo test --test debugger_visualizer --features "url/serde,url/debugger_visualizer" -- --test-threads=1
6350

6451
WASM:
6552
runs-on: ubuntu-latest
6653
steps:
67-
- uses: actions/checkout@v2
68-
- uses: actions-rs/toolchain@v1
54+
- uses: actions/checkout@v3
55+
- uses: dtolnay/rust-toolchain@stable
6956
with:
70-
profile: minimal
71-
toolchain: stable
72-
target: wasm32-unknown-unknown
73-
override: true
74-
- uses: actions-rs/cargo@v1
75-
with:
76-
command: build
77-
args: --target wasm32-unknown-unknown
57+
targets: wasm32-unknown-unknown
58+
- run: cargo build --target wasm32-unknown-unknown
7859

7960
Lint:
8061
runs-on: ubuntu-latest
8162
steps:
82-
- uses: actions/checkout@v2
83-
- uses: actions-rs/toolchain@v1
63+
- uses: actions/checkout@v3
64+
- uses: dtolnay/rust-toolchain@stable
8465
with:
85-
profile: minimal
86-
toolchain: stable
87-
override: true
8866
components: rustfmt, clippy
89-
- uses: actions-rs/cargo@v1
90-
with:
91-
command: fmt
92-
args: --all -- --check
93-
- uses: actions-rs/cargo@v1
67+
- run: cargo fmt --all --check
68+
- run: cargo clippy --workspace --all-targets -- -D warnings
9469
if: always()
95-
with:
96-
command: clippy
97-
args: --workspace --all-targets -- -D warnings
9870

9971
Audit:
10072
runs-on: ubuntu-latest
10173
steps:
102-
- uses: actions/checkout@v1
74+
- uses: actions/checkout@v3
10375
- uses: EmbarkStudios/cargo-deny-action@v1

0 commit comments

Comments
 (0)