Skip to content

Commit 3b07711

Browse files
authored
Run tests on GHA (#7)
1 parent a287259 commit 3b07711

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/CI.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
on: [push, pull_request]
2+
3+
name: CI
4+
5+
jobs:
6+
check:
7+
name: Check
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: actions-rs/toolchain@v1
12+
with:
13+
profile: minimal
14+
toolchain: stable
15+
override: true
16+
- name: Cargo check
17+
run: cargo check
18+
19+
python-test:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v2
23+
- uses: actions/setup-python@v2
24+
with:
25+
python-version: 3
26+
- name: Build wheels
27+
uses: messense/maturin-action@v1
28+
with:
29+
target: x86_64
30+
manylinux: auto
31+
args: --release --out dist/ --no-sdist
32+
- name: Install built wheel
33+
run: |
34+
pip install canonicaljson-rs --no-index --find-links dist/ --force-reinstall
35+
pip install pytest
36+
pytest
37+
38+
fmt:
39+
name: Rustfmt
40+
runs-on: ubuntu-latest
41+
steps:
42+
- uses: actions/checkout@v2
43+
- uses: actions-rs/toolchain@v1
44+
with:
45+
profile: minimal
46+
toolchain: stable
47+
override: true
48+
- run: rustup component add rustfmt
49+
- name: Lint
50+
run: cargo fmt --all -- --check

0 commit comments

Comments
 (0)