-
Notifications
You must be signed in to change notification settings - Fork 4
89 lines (76 loc) · 2.13 KB
/
tests.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
80
81
82
83
84
85
86
87
88
89
name: Tests
on:
pull_request:
push:
branches: [main, test]
jobs:
pre-commit:
name: Lint
runs-on: ubuntu-18.04
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- uses: pre-commit/[email protected]
test:
name: Python
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python: [ 3.7, 3.9, "3.10" ]
os: [ macos-latest, ubuntu-latest] # disable windows for now, windows-latest ]
defaults:
run:
shell: bash
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python and cache deps
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
cache: 'pip'
cache-dependency-path: requirements/CI.txt
- name: Install pip deps
run: |
pip install -r requirements/CI.txt
- name: Run tests
run: |
coverage run --source=phylokit -m pytest -x -n0
coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python and cache deps
uses: actions/setup-python@v4
with:
python-version: "3.9"
cache: 'pip'
cache-dependency-path: requirements/CI.txt
- name: Install pip deps
run: |
pip install -r requirements/CI.txt
- name: Generate coverage
run: |
PHYLOKIT_DISABLE_NUMBA=1 coverage run --source=phylokit -m pytest -x -n0
- name: Upload coverage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coveralls --service=github