forked from mila-iqia/COVI-AgentSim
-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (57 loc) · 2.27 KB
/
pythonapp.yml
File metadata and controls
61 lines (57 loc) · 2.27 KB
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Mila-IQIA Covid-19 Simulator
on:
push:
branches: [ master, develop, experimental ]
pull_request:
branches: [ master, develop, experimental ]
jobs:
test:
name: Test on Python ${{ matrix.python_version }}
runs-on: ubuntu-latest
timeout-minutes: 25
strategy:
matrix:
python_version: ['3.7', '3.8']
steps:
- name: Simulator source code checkout
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python_version }}
- name: Update pip wrt current Python version
run: |
python -m pip install --upgrade pip
- name: Machine learning source code checkout
uses: actions/checkout@v2
with:
repository: mila-iqia/COVI-ML
ref: littlecrunch # TODO: auto-select the name of the current simulator branch?
token: ${{ secrets.ORG_REPOS_AUTH_TOKEN }} # TODO: ONCE PUBLIC, REMOVE + DELETE TOKEN @@@
path: downloads/COVI-ML
- name: Machine learning package installation
run: |
# TODO: ctt should self-install its own requirements.txt...
pip install -r downloads/COVI-ML/requirements-minimal.txt
pip install -e downloads/COVI-ML
- name: Simulator package installation
run: |
pip install -e .
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test
run: |
pytest --cov-report=xml --cov=covid19sim --timeout=600 tests/
- uses: codecov/codecov-action@v1
with:
file: ./coverage.xml # optional
flags: unittests # optional
name: codecov-umbrella # optional
fail_ci_if_error: false # optional (default = false)