-
Notifications
You must be signed in to change notification settings - Fork 28
49 lines (39 loc) · 1.25 KB
/
ci.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
name: Run Tests
on: [push, pull_request]
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: nschloe/action-cached-lfs-checkout@v1
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.10'
- uses: ./.github/actions/setup-rust
with:
cache: true
- name: Install dependencies
run: |
sudo pip install --upgrade pip
pip install --user coverage pytest hypothesis wheel
- name: Test Rust package
run: |
cd ${GITHUB_WORKSPACE}/snapatac2-core
cargo test --release --all --no-fail-fast
- name: Build wheel files
run: |
cd ${GITHUB_WORKSPACE}/snapatac2-python
mkdir ${GITHUB_WORKSPACE}/wheel_files
pip wheel . --wheel-dir ${GITHUB_WORKSPACE}/wheel_files
- name: Test Python package
run: |
pip install --user ${GITHUB_WORKSPACE}/wheel_files/*.whl
coverage run -m pytest ${GITHUB_WORKSPACE}/snapatac2-python/tests
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v3
- name: Upload wheel files as artifacts
uses: actions/upload-artifact@v3
with:
name: wheel-files
path: ./wheel_files/snapatac2*.whl