-
Notifications
You must be signed in to change notification settings - Fork 3
95 lines (91 loc) · 2.5 KB
/
pytest.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
90
91
92
93
94
95
# Modified from GitHub Actions template
name: QA
# Improves reproducibility and speed
env:
OPENBLAS_NUM_THREADS: 1
OMP_NUM_THREADS: 1
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
Pytest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --upgrade pip wheel
pip install numpy==1.26.4
pip install -r requirements.txt
- name: Compile Cython components
run: |
make clean compile
- name: Test with pytest
run: |
python -m pytest --cov-report xml:cov.xml --cov=ecoli --cov=reconstruction --cov=wholecell --cov=runscripts --durations=0
- name: Code Coverage Report
uses: irongut/[email protected]
with:
filename: cov.xml
format: markdown
indicators: true
output: both
- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v2
if: github.event_name == 'pull_request'
with:
recreate: true
path: code-coverage-results.md
Mypy:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --upgrade pip wheel
pip install numpy==1.26.4 mypy
pip install -r requirements.txt
- name: Compile Cython components
run: |
make clean compile
- name: Mypy
run: |
mypy
Lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --upgrade pip wheel
pip install numpy==1.26.4 ruff
pip install -r requirements.txt
- name: Compile Cython components
run: |
make clean compile
- name: Ruff
run: |
ruff check doc ecoli migration wholecell runscripts validation reconstruction