1
1
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2
2
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3
3
4
- # Note that editable installs of Pydra and the task package is useful to ensure that the
5
- # template describes namespace packages that can be used in various development environments.
6
- # Packages that use it probably do not want to continue testing with editable installations,
7
- # quadrupling their test load.
8
-
9
4
# For deployment, it will be necessary to create a PyPI API token and store it as a secret
10
5
# https://docs.github.com/en/actions/reference/encrypted-secrets
11
6
23
18
branches : [ main ]
24
19
25
20
jobs :
26
- test :
21
+ devcheck :
27
22
runs-on : ubuntu-latest
28
23
strategy :
29
24
matrix :
30
- python-version : [3.7, 3.8, 3.9]
25
+ python-version : [3.7, 3.9] # Check oldest and newest versions
31
26
pip-flags : ['', '--editable']
32
27
pydra :
33
28
- ' pydra'
@@ -51,12 +46,37 @@ jobs:
51
46
pip install ${{ matrix.pip-flags }} ".[dev]"
52
47
python -c "import pydra.tasks.$SUBPACKAGE as m; print(f'{m.__name__} {m.__version__} @ {m.__file__}')"
53
48
python -c "import pydra as m; print(f'{m.__name__} {m.__version__} @ {m.__file__}')"
49
+
50
+ test :
51
+ runs-on : ubuntu-latest
52
+ strategy :
53
+ matrix :
54
+ python-version : [3.7, 3.8, 3.9]
55
+
56
+ steps :
57
+ - uses : actions/checkout@v2
58
+ - name : Set up Python ${{ matrix.python-version }}
59
+ uses : actions/setup-python@v2
60
+ with :
61
+ python-version : ${{ matrix.python-version }}
62
+ - name : Install build dependencies
63
+ run : |
64
+ python -m pip install --upgrade pip
65
+ - name : Install task package
66
+ run : |
67
+ pip install ".[test]"
68
+ python -c "import pydra.tasks.$SUBPACKAGE as m; print(f'{m.__name__} {m.__version__} @ {m.__file__}')"
69
+ python -c "import pydra as m; print(f'{m.__name__} {m.__version__} @ {m.__file__}')"
54
70
- name : Test with pytest
55
71
run : |
56
- pytest -sv --doctest-modules pydra/tasks/$SUBPACKAGE
72
+ pytest -sv --doctest-modules pydra/tasks/$SUBPACKAGE \
73
+ --cov pydra.tasks.$SUBPACKAGE --cov-report xml
74
+ - uses : codecov/codecov-action@v1
75
+ if : ${{ always() }}
76
+
57
77
58
78
deploy :
59
- needs : test
79
+ needs : [devcheck, test]
60
80
runs-on : ubuntu-latest
61
81
strategy :
62
82
matrix :
0 commit comments