Skip to content

Commit 4c339be

Browse files
committed
add CI workflow, copied from Rust SDK
1 parent bbd56ed commit 4c339be

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

.github/workflows/ci.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- "release/**"
8+
pull_request:
9+
10+
jobs:
11+
lints:
12+
name: Lints
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout sources
16+
uses: actions/checkout@v2
17+
18+
- name: Install stable toolchain
19+
uses: actions-rs/toolchain@v1
20+
with:
21+
profile: minimal
22+
toolchain: stable
23+
override: true
24+
components: rustfmt, clippy
25+
26+
- name: Run cargo fmt
27+
uses: actions-rs/cargo@v1
28+
with:
29+
command: fmt
30+
args: --all -- --check
31+
32+
- name: Run cargo clippy
33+
uses: actions-rs/cargo@v1
34+
with:
35+
command: clippy
36+
args: --all-features --workspace --tests --examples -- -D clippy::all
37+
38+
test:
39+
name: Test
40+
runs-on: ubuntu-latest
41+
42+
steps:
43+
- name: Checkout sources
44+
uses: actions/checkout@v2
45+
46+
- name: Install rust toolchain
47+
uses: actions-rs/toolchain@v1
48+
with:
49+
profile: minimal
50+
override: true
51+
52+
- uses: Swatinem/rust-cache@v1
53+
54+
- name: Run cargo test
55+
uses: actions-rs/cargo@v1
56+
with:
57+
command: test
58+
args: --workspace --all-features

0 commit comments

Comments
 (0)