Skip to content

Commit 10c466f

Browse files
committed
Add github-actions workflow
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
1 parent 99db671 commit 10c466f

File tree

1 file changed

+109
-0
lines changed

1 file changed

+109
-0
lines changed

.github/workflows/msrv.yml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
on: [push, pull_request]
2+
3+
name: MSRV
4+
5+
jobs:
6+
check:
7+
name: Check
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
rust:
12+
- stable
13+
- beta
14+
- nightly
15+
16+
steps:
17+
- name: Checkout sources
18+
uses: actions/checkout@v2
19+
20+
- name: Install toolchain
21+
uses: actions-rs/toolchain@v1
22+
with:
23+
toolchain: ${{ matrix.rust }}
24+
override: true
25+
26+
- name: Run cargo check
27+
uses: actions-rs/cargo@v1
28+
with:
29+
command: check
30+
31+
test:
32+
name: Test Suite
33+
runs-on: ubuntu-latest
34+
strategy:
35+
matrix:
36+
rust:
37+
- stable
38+
- beta
39+
- nightly
40+
steps:
41+
- name: Checkout sources
42+
uses: actions/checkout@v2
43+
44+
- name: Install toolchain
45+
uses: actions-rs/toolchain@v1
46+
with:
47+
toolchain: ${{ matrix.rust }}
48+
override: true
49+
50+
- name: Run cargo test
51+
uses: actions-rs/cargo@v1
52+
with:
53+
command: test
54+
55+
fmt:
56+
name: Rustfmt
57+
runs-on: ubuntu-latest
58+
strategy:
59+
matrix:
60+
rust:
61+
- stable
62+
- beta
63+
- nightly
64+
steps:
65+
- name: Checkout sources
66+
uses: actions/checkout@v2
67+
68+
- name: Install toolchain
69+
uses: actions-rs/toolchain@v1
70+
with:
71+
toolchain: ${{ matrix.rust }}
72+
override: true
73+
74+
- name: Install rustfmt
75+
run: rustup component add rustfmt
76+
77+
- name: Run cargo fmt
78+
uses: actions-rs/cargo@v1
79+
with:
80+
command: fmt
81+
args: --all -- --check
82+
83+
clippy:
84+
name: Clippy
85+
runs-on: ubuntu-latest
86+
strategy:
87+
matrix:
88+
rust:
89+
- stable
90+
- beta
91+
- nightly
92+
steps:
93+
- name: Checkout sources
94+
uses: actions/checkout@v2
95+
96+
- name: Install toolchain
97+
uses: actions-rs/toolchain@v1
98+
with:
99+
toolchain: ${{ matrix.rust }}
100+
override: true
101+
102+
- name: Install clippy
103+
run: rustup component add clippy
104+
105+
- name: Run cargo clippy
106+
uses: actions-rs/cargo@v1
107+
with:
108+
command: clippy
109+
args: -- -D warnings

0 commit comments

Comments
 (0)