Skip to content

Commit 3766138

Browse files
committed
Add basic github actions CI
1 parent b9551ed commit 3766138

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

.github/workflows/ci.yml

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
pull_request:
6+
7+
jobs:
8+
rustfmt:
9+
runs-on: macOS-latest
10+
name: rustfmt
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- name: install stable toolchain
15+
uses: actions-rs/toolchain@v1
16+
with:
17+
toolchain: stable
18+
profile: minimal
19+
components: rustfmt
20+
override: true
21+
22+
- name: install rustfmt
23+
run: rustup component add rustfmt
24+
25+
- name: cargo fmt
26+
uses: actions-rs/cargo@v1
27+
with:
28+
command: fmt
29+
args: --all -- --check
30+
31+
test-stable:
32+
runs-on: macOS-latest
33+
name: cargo test stable
34+
steps:
35+
- uses: actions/checkout@v2
36+
37+
- name: install cairo
38+
run: brew install cairo
39+
if: contains(matrix.os, 'mac')
40+
41+
- name: install stable toolchain
42+
uses: actions-rs/toolchain@v1
43+
with:
44+
toolchain: stable
45+
components: clippy
46+
profile: minimal
47+
override: true
48+
49+
- name: cargo clippy
50+
uses: actions-rs/cargo@v1
51+
with:
52+
command: clippy
53+
args: -- -D warnings
54+
55+
- name: cargo test
56+
uses: actions-rs/cargo@v1
57+
with:
58+
command: test

0 commit comments

Comments
 (0)