-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (64 loc) · 2.2 KB
/
pyDataPipeline.yaml
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
name: Python FAIR Data Pipeline
on: [push, workflow_dispatch]
jobs:
test:
name: Test ${{ matrix.os }} (Python ${{ matrix.python }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest,ubuntu-latest,macos-latest]
python: ["3.9", "3.10", "3.x"]
defaults:
run:
shell: bash
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Checkout pySimpleModel
uses: actions/checkout@v4
with:
repository: FAIRDataPipeline/pySimpleModel
path: pySimpleModel
- name: Move pySimpleModel
run: mv pySimpleModel ../pySimpleModel
- name: Run Tests on Windows
run: |
poetry install
pip3 install fair-cli
fair registry install
pip3 install ../pySimpleModel
fair init --ci
fair registry start
fair pull --local data_pipeline_api/ext/SEIRSconfig.yaml
fair run --local data_pipeline_api/ext/SEIRSconfig.yaml
poetry run pytest --cov=data_pipeline_api --cov-report=xml --cov-report=term -s tests/
if: matrix.os == 'windows-latest'
- name: Run Tests on other OS
if: matrix.os != 'windows-latest'
run: |
poetry install
source .venv/bin/activate
pip install fair-cli
fair registry install
pip install ../pySimpleModel
fair init --ci
fair registry start
fair pull --local data_pipeline_api/ext/SEIRSconfig.yaml
fair run --local data_pipeline_api/ext/SEIRSconfig.yaml
python3 -m poetry run pytest --cov=data_pipeline_api --cov-report=xml --cov-report=term -s tests/
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
fail_ci_if_error: false
verbose: true
if: matrix.python == '3.9' && matrix.os == 'ubuntu-latest'