-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (61 loc) · 1.77 KB
/
develop.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Test on PR
on:
pull_request:
branches: [ main ]
workflow_dispatch:
push:
branches:
- main
env:
CARGO_TERM_COLOR: always
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
TINYEVM_CI_TESTS: true
jobs:
Test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy, llvm-tools-preview
- name: Get OS infomration
id: os
run: echo "KERNEL=$(uname -r)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{steps.os.outputs.KERNEL}}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('**/Cargo.toml') }}
- uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
architecture: x64
- uses: taiki-e/install-action@cargo-llvm-cov
- uses: taiki-e/install-action@nextest
- name: Install Python dependencies
run: pip install -r requirements-dev.txt
- name: Check code formatting
run: cargo +stable fmt
- name: Check code linting
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Check documentation linting
run: cargo doc --no-deps --all-features
- name: Run Rust tests
run: cargo nextest run
- name: Install as local Python package
uses: PyO3/maturin-action@v1
with:
target: x86_64
args: --release
- name: Install built wheel and run Python tests
run: |
pip install target/wheels/*.whl --force-reinstall
pytest