-
-
Notifications
You must be signed in to change notification settings - Fork 126
64 lines (54 loc) · 1.57 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
name: Run tests
on:
push:
branches:
- main
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9"]
name: Set up Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
channels: conda-forge, defaults
channel-priority: true
python-version: ${{ matrix.python-version }}
auto-update-conda: true
- name: Install dev environment & bambi
shell: bash -l {0}
run: |
conda install -c conda-forge python-graphviz
conda install pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install .
python --version
conda list
pip freeze
- name: Run linters
shell: bash -l {0}
run: |
python -m black bambi --check
echo "Success!"
echo "Checking code style with pylint..."
python -m pylint bambi/
- name: Run tests
shell: bash -l {0}
run: |
python -m pytest -vv --cov=bambi --cov-report=term --cov-report=xml bambi/tests
env:
PYTHON_VERSION: ${{ matrix.python-version }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false