Skip to content

Commit 93bdeb2

Browse files
authored
Merge pull request #85 from robinst/fix-ci
CI fixes
2 parents 9c50f36 + 4dd8179 commit 93bdeb2

File tree

2 files changed

+23
-82
lines changed

2 files changed

+23
-82
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Based on https://github.com/actions-rs/meta/blob/master/recipes/msrv.md
2-
31
name: ci
42
on:
53
pull_request:
@@ -11,25 +9,10 @@ jobs:
119
check:
1210
name: check
1311
runs-on: ubuntu-latest
14-
strategy:
15-
matrix:
16-
rust:
17-
- stable
1812
steps:
19-
- name: Checkout sources
20-
uses: actions/checkout@v2
21-
22-
- name: Install toolchain
23-
uses: actions-rs/toolchain@v1
24-
with:
25-
toolchain: ${{ matrix.rust }}
26-
profile: minimal
27-
override: true
28-
29-
- name: Run cargo check
30-
uses: actions-rs/cargo@v1
31-
with:
32-
command: check
13+
- uses: actions/checkout@v4
14+
- uses: dtolnay/rust-toolchain@stable
15+
- run: cargo check
3316

3417
test:
3518
name: test
@@ -44,15 +27,10 @@ jobs:
4427
- rust: 1.46.0
4528
msrv: true
4629
steps:
47-
- name: Checkout sources
48-
uses: actions/checkout@v2
49-
50-
- name: Install toolchain
51-
uses: actions-rs/toolchain@v1
30+
- uses: actions/checkout@v4
31+
- uses: dtolnay/rust-toolchain@master
5232
with:
5333
toolchain: ${{ matrix.rust }}
54-
profile: minimal
55-
override: true
5634

5735
# See https://github.com/matklad/once_cell/issues/201
5836
# To test locally, enable the lock file and then run:
@@ -61,31 +39,15 @@ jobs:
6139
if: ${{ matrix.msrv }}
6240
run: cp Cargo.lock.msrv Cargo.lock
6341

64-
- name: Run cargo test
65-
uses: actions-rs/cargo@v1
66-
with:
67-
command: test
42+
- run: cargo test
6843

6944
fmt:
7045
name: rustfmt
7146
runs-on: ubuntu-latest
7247
steps:
73-
- name: Checkout sources
74-
uses: actions/checkout@v2
75-
76-
- name: Install toolchain
77-
uses: actions-rs/toolchain@v1
78-
with:
79-
toolchain: stable
80-
profile: minimal
81-
override: true
82-
components: rustfmt
83-
84-
- name: Run cargo fmt
85-
uses: actions-rs/cargo@v1
86-
with:
87-
command: fmt
88-
args: --all -- --check
48+
- uses: actions/checkout@v4
49+
- uses: dtolnay/rust-toolchain@stable
50+
- run: cargo fmt --all -- --check
8951

9052
coverage:
9153
name: coverage
@@ -94,15 +56,8 @@ jobs:
9456
image: xd009642/tarpaulin
9557
options: --security-opt seccomp=unconfined
9658
steps:
97-
- name: Checkout sources
98-
uses: actions/checkout@v4
99-
100-
- name: Generate code coverage
101-
uses: actions-rs/cargo@v1
102-
with:
103-
command: tarpaulin
104-
args: --out Xml
105-
59+
- uses: actions/checkout@v4
60+
- run: cargo tarpaulin --out Xml
10661
- name: Upload to codecov.io
10762
uses: codecov/codecov-action@v4
10863
with:
@@ -116,17 +71,9 @@ jobs:
11671
run:
11772
working-directory: demo
11873
steps:
119-
- name: Checkout sources
120-
uses: actions/checkout@v2
121-
122-
- name: Install toolchain
123-
uses: actions-rs/toolchain@v1
124-
with:
125-
toolchain: stable
126-
profile: minimal
127-
128-
- name: yarn
129-
run: yarn
130-
131-
- name: yarn build
132-
run: yarn build
74+
- uses: actions/checkout@v4
75+
# Waiting for new wasm-bindgen release to run with newer rust:
76+
# https://github.com/rustwasm/wasm-bindgen/issues/4211
77+
- uses: dtolnay/[email protected]
78+
- run: yarn
79+
- run: yarn build

.github/workflows/gh-pages.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,14 @@ jobs:
1212
run:
1313
working-directory: demo
1414
steps:
15-
- name: Checkout sources
16-
uses: actions/checkout@v2
15+
- uses: actions/checkout@v4
16+
# Waiting for new wasm-bindgen release to run with newer rust:
17+
# https://github.com/rustwasm/wasm-bindgen/issues/4211
18+
- uses: dtolnay/[email protected]
1719

18-
- name: Install toolchain
19-
uses: actions-rs/toolchain@v1
20-
with:
21-
toolchain: stable
22-
profile: minimal
23-
24-
- name: yarn
25-
run: yarn
20+
- run: yarn
2621

27-
- name: yarn build
28-
run: yarn build
22+
- run: yarn build
2923

3024
- name: Deploy to gh-pages
3125
uses: JamesIves/[email protected]

0 commit comments

Comments
 (0)