Skip to content

Commit 2968005

Browse files
authored
Add CI: auto test (#11)
* ✨ Automatically execute commands when pushing or creating a pull request
1 parent 57027f7 commit 2968005

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/ci.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags-ignore:
8+
- v*
9+
paths-ignore:
10+
- 'LICENSE'
11+
- '**.md'
12+
pull_request:
13+
paths-ignore:
14+
- 'LICENSE'
15+
- '**.md'
16+
17+
jobs:
18+
fmt:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: hecrj/setup-rust-action@v1
22+
with:
23+
rust-version: stable
24+
- uses: actions/checkout@v2
25+
- name: cargo fmt
26+
run: cargo fmt -- --check
27+
28+
clippy:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: hecrj/setup-rust-action@v1
32+
with:
33+
rust-version: stable
34+
- uses: actions/checkout@v2
35+
- name: cargo clippy
36+
run: cargo clippy -- -D warnings
37+
38+
unit_tests:
39+
runs-on: ${{ matrix.os }}
40+
strategy:
41+
matrix:
42+
os: [ubuntu-latest, macOS-latest]
43+
steps:
44+
- uses: hecrj/setup-rust-action@v1
45+
with:
46+
rust-version: stable
47+
- uses: actions/checkout@v2
48+
- name: Run tests
49+
run: cargo test -- --skip=feature_tests

0 commit comments

Comments
 (0)