Skip to content

Commit be2e5f8

Browse files
committed
Test on nightly and stable
Use the actions-rs actions to set things up
1 parent 24c4adb commit be2e5f8

File tree

1 file changed

+28
-5
lines changed

1 file changed

+28
-5
lines changed

.github/workflows/rust.yml

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,32 @@ on: [push]
55
jobs:
66
build:
77
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
rust:
11+
- stable
12+
- nightly
813
steps:
9-
- uses: actions/checkout@v1
14+
- uses: actions/checkout@v2
15+
- name: Install toolchain
16+
uses: actions-rs/toolchain@v1
17+
with:
18+
toolchain: ${{ matrix.rust }}
19+
override: true
1020
- name: Build
11-
run: cargo build --all-targets --verbose
21+
uses: actions-rs/cargo@v1
22+
with:
23+
command: build
24+
args: --all-targets --verbose
1225
- name: Run tests
13-
run: cargo test --verbose
26+
uses: actions-rs/cargo@v1
27+
with:
28+
command: test
29+
args: --verbose
1430
coverage:
1531
runs-on: ubuntu-latest
1632
steps:
17-
- uses: actions/checkout@v1
33+
- uses: actions/checkout@v2
1834
- name: Install stable toolchain
1935
uses: actions-rs/toolchain@v1
2036
with:
@@ -50,7 +66,14 @@ jobs:
5066
body: "${{ steps.get_changes.outputs.changelog }}"
5167
draft: false
5268
prerelease: true
69+
- name: Install stable toolchain
70+
uses: actions-rs/toolchain@v1
71+
with:
72+
toolchain: stable
5373
- name: Publish
74+
uses: actions-rs/cargo@v1
75+
with:
76+
command: test
77+
args: --verbose
5478
env:
5579
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_TOKEN }}
56-
run: cargo publish --verbose

0 commit comments

Comments
 (0)