-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (57 loc) · 1.48 KB
/
test-and-lint.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
name: Test and Lint
on: pull_request
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.9]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Setup MiniConda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: 3.9
channels: readdy/label/dev,conda-forge
- name: Install Conda Deps
shell: bash -l {0}
run: |
conda install readdy
- name: Install Dependencies
shell: bash -l {0}
run: |
python -m pip install --upgrade pip
pip install .[test]
- name: Test with pytest
shell: bash -l {0}
run: |
pytest vivarium_readdy/tests/
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup MiniConda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: 3.9
channels: readdy/label/dev,conda-forge
- name: Install Conda Deps
shell: bash -l {0}
run: |
conda install readdy
- name: Install Dependencies
shell: bash -l {0}
run: |
python -m pip install --upgrade pip
pip install .[test]
- name: Lint with flake8
shell: bash -l {0}
run: |
flake8 vivarium_readdy --count --verbose --show-source --statistics
- name: Check with black
shell: bash -l {0}
run: |
black --check vivarium_readdy