6
6
- master
7
7
pull_request :
8
8
9
-
10
9
defaults :
11
10
run :
12
11
shell : bash
13
12
13
+ concurrency :
14
+ group : ${{ github.workflow }}-${{ github.ref }}
15
+ cancel-in-progress : true
16
+
17
+ permissions :
18
+ contents : read
19
+
20
+
14
21
jobs :
15
22
build :
23
+ runs-on : ubuntu-latest
24
+ steps :
25
+ - uses : actions/checkout@v3
26
+ with :
27
+ fetch-depth : 0
28
+ - uses : actions/setup-python@v4
29
+ with :
30
+ python-version : 3
31
+ - run : pip install --upgrade build twine
32
+ - run : python -m build
33
+ - run : twine check dist/*
34
+ - uses : actions/upload-artifact@v3
35
+ with :
36
+ name : dist
37
+ path : dist/
38
+ - name : Build archive
39
+ run : |
40
+ git clean -fxd
41
+ mkdir archive
42
+ git archive -o archive/pydra.zip HEAD
43
+ - uses : actions/upload-artifact@v3
44
+ with :
45
+ name : archive
46
+ path : archive/
47
+
48
+ test :
49
+ needs : ['build']
16
50
strategy :
17
51
matrix :
18
52
os : [macos-latest, ubuntu-latest, windows-latest]
19
53
python-version : ['3.7', '3.8', '3.9', '3.10', '3.11']
54
+ install : ['wheel']
55
+ include :
56
+ - os : ' ubuntu-latest'
57
+ python-version : ' 3.11'
58
+ install : ' sdist'
59
+ - os : ' ubuntu-latest'
60
+ python-version : ' 3.11'
61
+ install : ' repo'
62
+ - os : ' ubuntu-latest'
63
+ python-version : ' 3.11'
64
+ install : ' archive'
20
65
exclude :
21
66
- os : ' windows-latest'
22
67
python-version : ' 3.11'
@@ -25,29 +70,59 @@ jobs:
25
70
26
71
27
72
steps :
28
- - uses : actions/checkout@v2
29
- - name : Disable etelemetry
30
- run : echo "NO_ET=TRUE" >> $GITHUB_ENV
31
- - name : Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
32
- uses : actions/setup-python@v2
33
- with :
34
- python-version : ${{ matrix.python-version }}
35
- - name : Update build tools
36
- run : |
37
- python -m pip install --upgrade pip
38
- python -m pip install build wheel
73
+ - name : Fetch sdist/wheel
74
+ uses : actions/download-artifact@v3
75
+ if : matrix.install == 'sdist' || matrix.install == 'wheel'
76
+ with :
77
+ name : dist
78
+ path : dist/
79
+ - name : Fetch git archive
80
+ uses : actions/download-artifact@v3
81
+ if : matrix.install == 'archive'
82
+ with :
83
+ name : archive
84
+ path : archive/
85
+ - name : Fetch repository
86
+ uses : actions/checkout@v3
87
+ if : matrix.install == 'repo'
88
+
89
+ - name : Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
90
+ uses : actions/setup-python@v4
91
+ with :
92
+ python-version : ${{ matrix.python-version }}
93
+ - name : Update pip
94
+ run : python -m pip install --upgrade pip
39
95
40
- - name : Build pydra
41
- run : python -m build
96
+ - name : Determine installation target
97
+ run : |
98
+ if [[ "$INSTALL" = "sdist" ]]; then
99
+ echo "ARCHIVE=$( ls dist/*.tar.gz )" >> $GITHUB_ENV
100
+ elif [[ "$INSTALL" = "wheel" ]]; then
101
+ echo "ARCHIVE=$( ls dist/*.whl )" >> $GITHUB_ENV
102
+ elif [[ "$INSTALL" = "archive" ]]; then
103
+ echo "ARCHIVE=$( ls archive/*.zip )" >> $GITHUB_ENV
104
+ elif [[ "$INSTALL" = "repo" ]]; then
105
+ echo "ARCHIVE=." >> $GITHUB_ENV
106
+ fi
107
+ env :
108
+ INSTALL : ${{ matrix.install }}
42
109
110
+ - name : Install Pydra
111
+ run : pip install $ARCHIVE
43
112
44
- - name : Install Pydra tests dependencies
45
- run : pip install "$( ls dist/ pydra*.whl )[test] "
113
+ - name : Print version
114
+ run : python -c "import pydra; print( pydra.__version__) "
46
115
116
+ - name : Install Pydra tests dependencies
117
+ run : pip install pydra[test]
47
118
48
- - name : Pytest
49
- run : pytest -vs -n auto --cov pydra --cov-config .coveragerc --cov-report xml:cov.xml --doctest-modules pydra
119
+ - name : Disable etelemetry
120
+ run : echo "NO_ET=TRUE" >> $GITHUB_ENV
50
121
122
+ - name : Pytest
123
+ run : |
124
+ pytest -vs -n auto --doctest-modules --pyargs pydra \
125
+ --cov pydra --cov-config .coveragerc --cov-report xml:cov.xml
51
126
52
- - name : Upload to codecov
53
- run : codecov -f cov.xml -F unittests -e GITHUB_WORKFLOW
127
+ - name : Upload to codecov
128
+ run : codecov -f cov.xml -F unittests -e GITHUB_WORKFLOW
0 commit comments