1
1
name : ci
2
2
3
- on : [push, pull_request]
3
+ on : [push, pull_request, workflow_dispatch ]
4
4
5
5
jobs :
6
6
examples :
@@ -21,17 +21,27 @@ jobs:
21
21
uses : actions/setup-python@v4
22
22
with :
23
23
python-version : ${{ matrix.python-version }}
24
+ - name : Refresh Package Sources
25
+ run : |
26
+ sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse" > /etc/apt/sources.list'
27
+ sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse" >> /etc/apt/sources.list'
28
+ sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal-security main restricted universe multiverse" >> /etc/apt/sources.list'
29
+ sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse" >> /etc/apt/sources.list'
30
+ sudo sh -c 'echo "deb http://archive.canonical.com/ubuntu focal partner" >> /etc/apt/sources.list'
31
+ sudo apt-get update -y
24
32
- name : Install dependencies
25
33
run : |
26
- sudo apt-get install libpython2.7 # required by paup
34
+ sudo apt-get install aptitude
35
+ sudo aptitude install -y gcc-7 g++-7 gfortran-7
36
+ sudo apt-get install -y libpython2.7 # required by paup
27
37
python -m pip install --upgrade pip
28
38
- name : Install paup
29
39
run : |
30
40
temp_dir=$(mktemp -d)
31
- wget -P ${temp_dir} http://phylosolutions.com/paup-test/paup4a168_ubuntu64 .gz
32
- gunzip ${temp_dir}/paup4a168_ubuntu64 .gz
33
- chmod +x ${temp_dir}/paup4a168_ubuntu64
34
- sudo mv ${temp_dir}/paup4a168_ubuntu64 /usr/local/bin/paup
41
+ wget -P ${temp_dir} http://phylosolutions.com/paup-test/paup4a169_ubuntu64 .gz
42
+ gunzip ${temp_dir}/paup4a169_ubuntu64 .gz
43
+ chmod +x ${temp_dir}/paup4a169_ubuntu64
44
+ sudo mv ${temp_dir}/paup4a169_ubuntu64 /usr/local/bin/paup
35
45
echo "export DENDROPY_PAUP_EXECUTABLE_PATH=/usr/local/bin/paup" >> "${GITHUB_ENV}"
36
46
- name : Install dendropy
37
47
run : |
71
81
fail-fast : False
72
82
matrix :
73
83
python-version :
74
- - " 2.7"
75
- - " 3.5"
76
84
- " 3.6"
77
85
- " 3.7"
78
86
- " 3.8"
@@ -86,31 +94,95 @@ jobs:
86
94
continue-on-error : true
87
95
with :
88
96
python-version : ${{ matrix.python-version }}
97
+ - name : Refresh Package Sources
98
+ run : |
99
+ sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse" > /etc/apt/sources.list'
100
+ sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse" >> /etc/apt/sources.list'
101
+ sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal-security main restricted universe multiverse" >> /etc/apt/sources.list'
102
+ sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse" >> /etc/apt/sources.list'
103
+ sudo sh -c 'echo "deb http://archive.canonical.com/ubuntu focal partner" >> /etc/apt/sources.list'
104
+ sudo apt-get update -y
89
105
- name : Install dependencies
90
106
run : |
91
- sudo apt-get update
92
- sudo apt-get install python2 libpython2.7 # required by paup
107
+ sudo apt-get install aptitude
108
+ sudo aptitude install -y gcc-7 g++-7 gfortran-7
109
+ sudo apt-get install -y libpython2.7 # required by paup
93
110
python -m pip install --upgrade pip
94
- if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
111
+ if [ -f .github/workflows/ requirements.txt ]; then pip install -r .github/workflows/ requirements.txt; fi
95
112
- name : Install paup
96
113
run : |
97
114
temp_dir=$(mktemp -d)
98
- wget -P ${temp_dir} http://phylosolutions.com/paup-test/paup4a168_ubuntu64 .gz
99
- gunzip ${temp_dir}/paup4a168_ubuntu64 .gz
100
- chmod +x ${temp_dir}/paup4a168_ubuntu64
101
- sudo mv ${temp_dir}/paup4a168_ubuntu64 /usr/local/bin/paup
115
+ wget -P ${temp_dir} http://phylosolutions.com/paup-test/paup4a169_ubuntu64 .gz
116
+ gunzip ${temp_dir}/paup4a169_ubuntu64 .gz
117
+ chmod +x ${temp_dir}/paup4a169_ubuntu64
118
+ sudo mv ${temp_dir}/paup4a169_ubuntu64 /usr/local/bin/paup
102
119
echo "export DENDROPY_PAUP_EXECUTABLE_PATH=/usr/local/bin/paup" >> "${GITHUB_ENV}"
103
- - name : Python2 compatibility workaround # TODO remove when Python2 compatibility dropped
104
- if : matrix.python-version == '2.7'
120
+ - name : Unit tests with setup.py
121
+ run : |
122
+ python setup.py pytest --addopts '-m "not smoke"'
123
+ - name : Smoke tests with setup.py
124
+ run : |
125
+ python setup.py pytest --addopts "-m smoke"
126
+
127
+ entrypoints :
128
+ runs-on : ubuntu-20.04
129
+ strategy :
130
+ fail-fast : False
131
+ matrix :
132
+ python-version :
133
+ - " 3.6"
134
+ - " 3.7"
135
+ - " 3.8"
136
+ - " 3.9"
137
+ - " 3.10"
138
+ - " 3.11"
139
+ steps :
140
+ - uses : actions/checkout@v3
141
+ - name : Set up Python ${{ matrix.python-version }}
142
+ uses : actions/setup-python@v4
143
+ continue-on-error : true
144
+ with :
145
+ python-version : ${{ matrix.python-version }}
146
+ - name : Refresh Package Sources
105
147
run : |
106
- rm tests/dendropy
107
- curl --silent --show-error --retry 5 https://bootstrap.pypa.io/pip/2.7/get-pip.py | sudo python2
108
- python2 -m pip install setuptools --upgrade
109
- python2 setup.py test
110
- - name : Test with setup.py
111
- if : matrix.python-version != '2.7'
148
+ sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse" > /etc/apt/sources.list'
149
+ sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse" >> /etc/apt/sources.list'
150
+ sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal-security main restricted universe multiverse" >> /etc/apt/sources.list'
151
+ sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse" >> /etc/apt/sources.list'
152
+ sudo sh -c 'echo "deb http://archive.canonical.com/ubuntu focal partner" >> /etc/apt/sources.list'
153
+ sudo apt-get update -y
154
+ - name : Install dependencies
112
155
run : |
113
- python setup.py test
156
+ sudo apt-get install aptitude
157
+ sudo aptitude install -y gcc-7 g++-7 gfortran-7
158
+ sudo apt-get install libpython2.7 # required by paup
159
+ python -m pip install --upgrade pip
160
+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
161
+ python -m pip install .
162
+ - name : Test sumtrees
163
+ run : |
164
+ which sumtrees
165
+ sumtrees --help
166
+ sumtrees 2>&1 | grep sumtrees || exit 1
167
+ - name : Test sumlabels
168
+ run : |
169
+ which sumlabels
170
+ sumlabels --help
171
+ sumlabels 2>&1 | grep sumlabels || exit 1
172
+ - name : Test dendropy-format
173
+ run : |
174
+ which dendropy-format
175
+ dendropy-format --help
176
+ dendropy-format 2>&1 | grep dendropy-format || exit 1
177
+ - name : Test deprecated entrypoints
178
+ run : |
179
+ which sumtrees.py
180
+ sumtrees.py --help
181
+ sumtrees.py 2>&1 | grep sumtrees.py || exit 1
182
+ which sumlabels.py
183
+ sumlabels.py --help
184
+ sumlabels.py 2>&1 | grep sumlabels.py || exit 1
185
+
114
186
coverage :
115
187
runs-on : ubuntu-20.04
116
188
steps :
@@ -119,24 +191,36 @@ jobs:
119
191
uses : actions/setup-python@master
120
192
with :
121
193
python-version : 3.8
122
- - name : Install paup
194
+ - name : Refresh Package Sources
123
195
run : |
124
- sudo apt-get install libpython2.7 # required by paup
196
+ sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse" > /etc/apt/sources.list'
197
+ sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse" >> /etc/apt/sources.list'
198
+ sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal-security main restricted universe multiverse" >> /etc/apt/sources.list'
199
+ sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse" >> /etc/apt/sources.list'
200
+ sudo sh -c 'echo "deb http://archive.canonical.com/ubuntu focal partner" >> /etc/apt/sources.list'
201
+ sudo apt-get update -y
202
+ - name : Install dependencies
203
+ run : |
204
+ sudo apt-get install aptitude
205
+ sudo aptitude install -y gcc-7 g++-7 gfortran-7
206
+ sudo apt-get install -y libpython2.7 # required by paup
207
+ python -m pip install --upgrade pip
125
208
temp_dir=$(mktemp -d)
126
- wget -P ${temp_dir} http://phylosolutions.com/paup-test/paup4a168_ubuntu64 .gz
127
- gunzip ${temp_dir}/paup4a168_ubuntu64 .gz
128
- chmod +x ${temp_dir}/paup4a168_ubuntu64
129
- sudo mv ${temp_dir}/paup4a168_ubuntu64 /usr/local/bin/paup
209
+ wget -P ${temp_dir} http://phylosolutions.com/paup-test/paup4a169_ubuntu64 .gz
210
+ gunzip ${temp_dir}/paup4a169_ubuntu64 .gz
211
+ chmod +x ${temp_dir}/paup4a169_ubuntu64
212
+ sudo mv ${temp_dir}/paup4a169_ubuntu64 /usr/local/bin/paup
130
213
echo "export DENDROPY_PAUP_EXECUTABLE_PATH=/usr/local/bin/paup" >> "${GITHUB_ENV}"
131
214
- name : Install coverage dependencies
132
215
run : |
133
216
python3 -m pip install pytest
134
217
python3 -m pip install pytest-cov
135
218
- name : Generate coverage report
136
219
run : |
137
- python3 -m pytest tests --cov=tests/dendropy --cov-report=xml
138
- - uses : codecov/codecov-action@v3
220
+ python3 -m pytest tests/unittests --cov=tests --cov-report=xml
221
+ - uses : codecov/codecov-action@v4
139
222
with :
223
+ token : ae13d715-bae4-4e6d-9dce-f47e7d7c7c01
140
224
flags : unittests # optional
141
225
fail_ci_if_error : true # optional (default = false)
142
226
verbose : true # optional (default = false)
@@ -189,6 +273,40 @@ jobs:
189
273
run : |
190
274
find . -type f -name '*.py' -exec rm {} \;
191
275
python3 -c "import dendropy; print(dendropy.__version__)"
276
+ docs :
277
+ permissions :
278
+ contents : write
279
+ runs-on : ubuntu-latest
280
+ steps :
281
+ - name : Checkout
282
+ uses : actions/checkout@v2
283
+ - name : Set up Python 3.9
284
+ uses : actions/setup-python@v4
285
+ continue-on-error : true
286
+ with :
287
+ python-version : 3.9
288
+ - name : Upgrade pip
289
+ run : python3 -m pip install pip --upgrade
290
+ - name : Install from source
291
+ run : python3 -m pip install .
292
+ - name : Install documentation build dependencies
293
+ run : python3 -m pip install -r docs/requirements.txt
294
+ - name : Build documentation
295
+ run : make -C docs html
296
+ - name : Deploy docs
297
+ if : github.ref == 'refs/heads/main'
298
+ uses : JamesIves/github-pages-deploy-action@v4
299
+ with :
300
+ folder : docs/build/html # The folder the action should deploy.
301
+ # uses: jsmrcaga/[email protected]
302
+ # with:
303
+ # NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
304
+ # NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
305
+ # NETLIFY_DEPLOY_MESSAGE: "Prod deploy v${{ github.ref }}"
306
+ # NETLIFY_DEPLOY_TO_PROD: true
307
+ # install_command: "echo Skipping installing the dependencies"
308
+ # build_command: "echo Skipping building the web files"
309
+ # build_directory: docs/build/html
192
310
deploy :
193
311
runs-on : ubuntu-latest
194
312
if : startsWith(github.ref, 'refs/tags/v')
@@ -212,3 +330,23 @@ jobs:
212
330
with :
213
331
user : __token__
214
332
password : ${{ secrets.PYPI_API_TOKEN }}
333
+ paper :
334
+ runs-on : ubuntu-latest
335
+ name : Paper Draft
336
+ steps :
337
+ - name : Checkout
338
+ uses : actions/checkout@v4
339
+ - name : Build draft PDF
340
+ uses : openjournals/openjournals-draft-action@master
341
+ with :
342
+ journal : joss
343
+ # This should be the path to the paper within your repo.
344
+ paper-path : joss/paper.md
345
+ - name : Upload
346
+ uses : actions/upload-artifact@v4
347
+ with :
348
+ name : paper
349
+ # This is the output path where Pandoc will write the compiled
350
+ # PDF. Note, this should be the same directory as the input
351
+ # paper.md
352
+ path : joss/paper.pdf
0 commit comments