-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (63 loc) · 1.95 KB
/
test.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
name: Test
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
run:
runs-on: ${{ matrix.config.os }}
name: ${{matrix.config.os }} (${{ matrix.config.py }})
strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-latest, py: '3.9'}
- {os: ubuntu-latest, py: '3.10'}
- {os: ubuntu-latest, py: '3.11'}
- {os: ubuntu-latest, py: '3.12'}
- {os: ubuntu-latest, py: '3.13'}
- {os: macos-latest, py: '3.13'}
- {os: windows-latest, py: '3.13'}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.config.py }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.config.py }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install hatch
# Compiling outpack server from source takes a few minutes each time.
# This action will cache the result and re-use it on subsequent builds.
# The cache is keyed by Git revision, allowing us to pick up new versions
# of the server immediately.
- name: Install outpack server
uses: baptiste0928/cargo-install@v3
with:
crate: outpack
git: https://github.com/mrc-ide/outpack_server
features: git2/vendored-libgit2
- name: Test
run: |
hatch run cov-ci
- name: Lint
run: |
# https://github.com/python/mypy/issues/10863
mkdir -p .mypy_cache
hatch run lint:all
- name: Test install
run: |
pip install .
python -c "import pyorderly"
- name: Upload to Codecov
uses: codecov/codecov-action@v4
with:
# This can be useful, but the false positive rate is
# annoyingly high.
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}