-
-
Notifications
You must be signed in to change notification settings - Fork 80
50 lines (46 loc) · 1.28 KB
/
ci.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
name: CI
on:
# Need to also run on pushes to master since PRs from a fork won't have
# access to the super user token, thereby skipping the integration tests
# and doctests
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ${{ matrix.os }}
env:
REDCAPDEMO_SUPERUSER_TOKEN: ${{ secrets.REDCAPDEMO_SUPERUSER_TOKEN }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Run poetry image
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: 1.3.1
- name: Install dependencies
run: |
poetry install -E data_science
- name: Run doctests
# Forks can't run doctests, requires super user token
if: github.triggering_actor == 'pwildenhain'
run: |
poetry run pytest --doctest-only --doctest-plus
- name: Run tests
run: |
poetry run pytest
- name: Build docs
run: |
poetry run mkdocs build
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2.1.0