Skip to content

Commit bc2cd6e

Browse files
Merge pull request #637 from nsoranzo/sync_ci_wfs
Sync CI workflows with tools-iuc
2 parents 52efe03 + 9f50250 commit bc2cd6e

File tree

3 files changed

+65
-60
lines changed

3 files changed

+65
-60
lines changed

.github/workflows/ci.yaml

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ jobs:
2727
steps:
2828
- name: Add reaction
2929
if: ${{ github.event.client_payload.slash_command.command == 'run-all-tool-tests' }}
30-
uses: peter-evans/create-or-update-comment@v4
30+
uses: peter-evans/create-or-update-comment@v5
3131
with:
3232
token: ${{ secrets.PAT }}
3333
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
3434
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
35-
reaction-type: hooray
35+
reactions: hooray
3636
- name: Set galaxy fork and branch
3737
id: get-fork-branch
3838
run: |
@@ -43,7 +43,7 @@ jobs:
4343
- name: Determine latest commit in the Galaxy repo
4444
id: get-galaxy-sha
4545
run: echo "galaxy-head-sha=$(git ls-remote https://github.com/${{ steps.get-fork-branch.outputs.fork }}/galaxy refs/heads/${{ steps.get-fork-branch.outputs.branch }} | cut -f1)" >> $GITHUB_OUTPUT
46-
- uses: actions/setup-python@v5
46+
- uses: actions/setup-python@v6
4747
with:
4848
python-version: ${{ matrix.python-version }}
4949
- name: Cache .cache/pip
@@ -56,9 +56,9 @@ jobs:
5656
# are not available as wheels, pip will build a wheel for them, which can be cached.
5757
- name: Install wheel
5858
run: pip install wheel
59-
- uses: actions/checkout@v4
59+
- uses: actions/checkout@v6
6060
with:
61-
fetch-depth: 1
61+
persist-credentials: false
6262
- name: Fake a Planemo run to update cache and determine commit range, repositories, and chunks
6363
uses: galaxyproject/planemo-ci-action@v1
6464
id: discover
@@ -75,7 +75,7 @@ jobs:
7575
echo 'Using ${{ steps.discover.outputs.chunk-count }} chunks (${{ steps.discover.outputs.chunk-list }})'
7676
7777
lint:
78-
name: Check for missing containers
78+
name: Lint tool-list
7979
needs: setup
8080
if: ${{ needs.setup.outputs.repository-list != '' || needs.setup.outputs.tool-list != '' }}
8181
runs-on: ubuntu-latest
@@ -84,10 +84,10 @@ jobs:
8484
matrix:
8585
python-version: ['3.11']
8686
steps:
87-
- uses: actions/checkout@v4
87+
- uses: actions/checkout@v6
8888
with:
89-
fetch-depth: 1
90-
- uses: actions/setup-python@v5
89+
persist-credentials: false
90+
- uses: actions/setup-python@v6
9191
with:
9292
python-version: ${{ matrix.python-version }}
9393
- name: Cache .cache/pip
@@ -101,10 +101,11 @@ jobs:
101101
id: lint
102102
with:
103103
mode: lint
104+
fail-level: warn
104105
repository-list: ${{ needs.setup.outputs.repository-list }}
105106
tool-list: ${{ needs.setup.outputs.tool-list }}
106-
additional-planemo-options: --biocontainers -s tests,output,inputs,help,general,command,citations,tool_xsd,xml_order,tool_urls,shed_metadata
107-
- uses: actions/upload-artifact@v4
107+
additional-planemo-options: --biocontainers --skip tests,output,inputs,help,general,command,citations,tool_xsd,xml_order,tool_urls,shed_metadata,version_bumped
108+
- uses: actions/upload-artifact@v5
108109
if: ${{ failure() }}
109110
with:
110111
name: 'Tool linting output'
@@ -131,12 +132,10 @@ jobs:
131132
ports:
132133
- 5432:5432
133134
steps:
134-
# checkout the repository
135-
# and use it as the current working directory
136-
- uses: actions/checkout@v4
135+
- uses: actions/checkout@v6
137136
with:
138-
fetch-depth: 1
139-
- uses: actions/setup-python@v5
137+
persist-credentials: false
138+
- uses: actions/setup-python@v6
140139
with:
141140
python-version: ${{ matrix.python-version }}
142141
- name: Cache .cache/pip
@@ -163,7 +162,7 @@ jobs:
163162
galaxy-slots: ${{ steps.cpu-cores.outputs.count }}
164163
# Limit each test to 15 minutes
165164
test_timeout: 900
166-
- uses: actions/upload-artifact@v4
165+
- uses: actions/upload-artifact@v5
167166
with:
168167
name: 'Tool test output ${{ matrix.chunk }}'
169168
path: upload
@@ -182,10 +181,10 @@ jobs:
182181
# This job runs on Linux
183182
runs-on: ubuntu-latest
184183
steps:
185-
- uses: actions/download-artifact@v4
184+
- uses: actions/download-artifact@v6
186185
with:
187186
path: artifacts
188-
- uses: actions/setup-python@v5
187+
- uses: actions/setup-python@v6
189188
with:
190189
python-version: ${{ matrix.python-version }}
191190
- name: Cache .cache/pip
@@ -200,18 +199,20 @@ jobs:
200199
with:
201200
mode: combine
202201
html-report: true
203-
- uses: actions/upload-artifact@v4
202+
markdown-report: true
203+
- uses: actions/upload-artifact@v5
204204
with:
205205
name: 'All tool test results'
206206
path: upload
207+
- run: cat upload/tool_test_output.md >> $GITHUB_STEP_SUMMARY
207208
- name: Create URL to the run output
208209
if: ${{ github.event.client_payload.slash_command.command == 'run-all-tool-tests' }}
209210
id: vars
210211
run: echo "run-url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_OUTPUT
211212

212213
- name: Create comment
213214
if: ${{ github.event.client_payload.slash_command.command == 'run-all-tool-tests' }}
214-
uses: peter-evans/create-or-update-comment@v4
215+
uses: peter-evans/create-or-update-comment@v5
215216
with:
216217
token: ${{ secrets.PAT }}
217218
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}

.github/workflows/pr.yaml

Lines changed: 42 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
- name: Determine latest commit in the Galaxy repo
6060
id: get-galaxy-sha
6161
run: echo "galaxy-head-sha=$(git ls-remote https://github.com/${{ env.GALAXY_FORK }}/galaxy refs/heads/${{ env.GALAXY_BRANCH }} | cut -f1)" >> $GITHUB_OUTPUT
62-
- uses: actions/setup-python@v5
62+
- uses: actions/setup-python@v6
6363
with:
6464
python-version: ${{ matrix.python-version }}
6565
- name: Cache .cache/pip
@@ -80,9 +80,10 @@ jobs:
8080
run: pip install wheel
8181
- name: Install flake8
8282
run: pip install flake8 flake8-import-order
83-
- uses: actions/checkout@v4
83+
- uses: actions/checkout@v6
8484
with:
8585
fetch-depth: 0
86+
persist-credentials: false
8687
- name: Fake a Planemo run to update cache and determine commit range, repositories, and chunks
8788
uses: galaxyproject/planemo-ci-action@v1
8889
id: discover
@@ -113,10 +114,10 @@ jobs:
113114
matrix:
114115
python-version: ['3.11']
115116
steps:
116-
- uses: actions/checkout@v4
117+
- uses: actions/checkout@v6
117118
with:
118-
fetch-depth: 1
119-
- uses: actions/setup-python@v5
119+
persist-credentials: false
120+
- uses: actions/setup-python@v6
120121
with:
121122
python-version: ${{ matrix.python-version }}
122123
- name: Cache .cache/pip
@@ -126,23 +127,24 @@ jobs:
126127
path: ~/.cache/pip
127128
key: pip_cache_py_${{ matrix.python-version }}_gxy_${{ needs.setup.outputs.galaxy-head-sha }}
128129

129-
- name: Set fail level for pull request
130-
if: ${{ github.event_name == 'pull_request' }}
131-
run:
132-
echo "FAIL_LEVEL=warn" >> "$GITHUB_ENV"
133-
- name: Set fail level for merge
130+
- name: Set skip version check for push event (i.e. merge to main)
134131
if: ${{ github.event_name != 'pull_request' }}
135132
run:
136-
echo "FAIL_LEVEL=error" >> "$GITHUB_ENV"
133+
echo "EXTRA_SKIP=--skip version_bumped" >> "$GITHUB_ENV"
134+
- name: Set no skip for pull_request events
135+
if: ${{ github.event_name == 'pull_request' }}
136+
run:
137+
echo "EXTRA_SKIP=" >> "$GITHUB_ENV"
137138
- name: Planemo lint
138139
uses: galaxyproject/planemo-ci-action@v1
139140
id: lint
140141
with:
141142
mode: lint
142-
fail-level: ${{ env.FAIL_LEVEL }}
143+
fail-level: warn
143144
repository-list: ${{ needs.setup.outputs.repository-list }}
144145
tool-list: ${{ needs.setup.outputs.tool-list }}
145-
- uses: actions/upload-artifact@v4
146+
additional-planemo-options: ${{ env.EXTRA_SKIP }}
147+
- uses: actions/upload-artifact@v5
146148
if: ${{ failure() }}
147149
with:
148150
name: 'Tool linting output'
@@ -159,10 +161,10 @@ jobs:
159161
matrix:
160162
python-version: ['3.11']
161163
steps:
162-
- uses: actions/checkout@v4
164+
- uses: actions/checkout@v6
163165
with:
164-
fetch-depth: 1
165-
- uses: actions/setup-python@v5
166+
persist-credentials: false
167+
- uses: actions/setup-python@v6
166168
with:
167169
python-version: ${{ matrix.python-version }}
168170
- name: Cache .cache/pip
@@ -175,7 +177,7 @@ jobs:
175177
run: pip install flake8 flake8-import-order
176178
- name: Flake8
177179
run: echo '${{ needs.setup.outputs.repository-list }}' | xargs -d '\n' flake8 --output-file pylint_report.txt --tee
178-
- uses: actions/upload-artifact@v4
180+
- uses: actions/upload-artifact@v5
179181
if: ${{ failure() }}
180182
with:
181183
name: 'Python linting output'
@@ -191,9 +193,9 @@ jobs:
191193
os: [ubuntu-24.04]
192194
r-version: ['release']
193195
steps:
194-
- uses: actions/checkout@v4
196+
- uses: actions/checkout@v6
195197
with:
196-
fetch-depth: 1
198+
persist-credentials: false
197199
- uses: r-lib/actions/setup-r@v2
198200
with:
199201
r-version: ${{ matrix.r-version }}
@@ -214,7 +216,7 @@ jobs:
214216
echo '${{ needs.setup.outputs.repository-list }}' | xargs -d '\n' -n 1 ./.github/styler.R --dry off
215217
git status
216218
git diff --exit-code | tee rlint_report.txt
217-
- uses: actions/upload-artifact@v4
219+
- uses: actions/upload-artifact@v5
218220
if: ${{ failure() }}
219221
with:
220222
name: 'R linting output'
@@ -226,9 +228,10 @@ jobs:
226228
if: ${{ github.event_name == 'pull_request' && needs.setup.outputs.repository-list != '' }}
227229
runs-on: ubuntu-latest
228230
steps:
229-
- uses: actions/checkout@v4
231+
- uses: actions/checkout@v6
230232
with:
231233
fetch-depth: 0
234+
persist-credentials: false
232235
- name: Check file sizes
233236
run: |
234237
touch file_size_report.txt
@@ -241,7 +244,7 @@ jobs:
241244
cat file_size_report.txt
242245
exit 1
243246
fi
244-
- uses: actions/upload-artifact@v4
247+
- uses: actions/upload-artifact@v5
245248
if: ${{ failure() }}
246249
with:
247250
name: 'File size report'
@@ -269,10 +272,10 @@ jobs:
269272
ports:
270273
- 5432:5432
271274
steps:
272-
- uses: actions/checkout@v4
275+
- uses: actions/checkout@v6
273276
with:
274-
fetch-depth: 1
275-
- uses: actions/setup-python@v5
277+
persist-credentials: false
278+
- uses: actions/setup-python@v6
276279
with:
277280
python-version: ${{ matrix.python-version }}
278281
- name: Cache .cache/pip
@@ -304,8 +307,8 @@ jobs:
304307
chunk-count: ${{ needs.setup.outputs.chunk-count }}
305308
galaxy-slots: ${{ steps.cpu-cores.outputs.count }}
306309
# Limit each test to 15 minutes
307-
test_timeout: 1800
308-
- uses: actions/upload-artifact@v4
310+
test_timeout: 900
311+
- uses: actions/upload-artifact@v5
309312
with:
310313
name: 'Tool test output ${{ matrix.chunk }}'
311314
path: upload
@@ -324,10 +327,10 @@ jobs:
324327
matrix:
325328
python-version: ['3.11']
326329
steps:
327-
- uses: actions/download-artifact@v4
330+
- uses: actions/download-artifact@v6
328331
with:
329332
path: artifacts
330-
- uses: actions/setup-python@v5
333+
- uses: actions/setup-python@v6
331334
with:
332335
python-version: ${{ matrix.python-version }}
333336
- name: Cache .cache/pip
@@ -343,7 +346,7 @@ jobs:
343346
mode: combine
344347
html-report: true
345348
markdown-report: true
346-
- uses: actions/upload-artifact@v4
349+
- uses: actions/upload-artifact@v5
347350
with:
348351
name: 'All tool test results'
349352
path: upload
@@ -355,7 +358,8 @@ jobs:
355358
mode: check
356359
- name: Check if all test chunks succeeded
357360
run: |
358-
NFILES=$(ls artifacts/ | grep "Tool test output" | wc -l)
361+
ls artifacts/
362+
NFILES=$(find artifacts/ -name "tool_test_output.json" | wc -l)
359363
if [[ "${{ needs.setup.outputs.chunk-count }}" != "$NFILES" ]]; then
360364
exit 1
361365
fi
@@ -370,10 +374,10 @@ jobs:
370374
matrix:
371375
python-version: ['3.11']
372376
steps:
373-
- uses: actions/checkout@v4
377+
- uses: actions/checkout@v6
374378
with:
375-
fetch-depth: 1
376-
- uses: actions/setup-python@v5
379+
persist-credentials: false
380+
- uses: actions/setup-python@v6
377381
with:
378382
python-version: ${{ matrix.python-version }}
379383
- name: Cache .cache/pip
@@ -401,22 +405,22 @@ jobs:
401405
deploy-report:
402406
name: Report deploy status
403407
needs: [deploy]
404-
if: ${{ always() && needs.deploy.result != 'success' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' ) && github.repository_owner == 'galaxyproject' }}
408+
if: ${{ always() && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' ) && github.repository_owner == 'galaxyproject' }}
405409
runs-on: ubuntu-latest
406410
steps:
407411
# report to the PR if deployment failed
408412
- name: Get PR object
409-
uses: 8BitJonny/gh-get-current-pr@2.2.0
413+
uses: 8BitJonny/gh-get-current-pr@4.0.0
410414
id: getpr
411415
with:
412416
sha: ${{ github.event.after }}
413417
- name: Create comment
414-
uses: peter-evans/create-or-update-comment@v4
418+
uses: peter-evans/create-or-update-comment@v5
415419
with:
416420
token: ${{ secrets.PAT }}
417421
issue-number: ${{ steps.getpr.outputs.number }}
418422
body: |
419-
Attention: deployment ${{ needs.deploy.result }}!
423+
Deployment status: **${{ needs.deploy.result }}**
420424
421425
https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
422426

.github/workflows/slash.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
steps:
99
- name: Slash Command Dispatch
1010
if: github.repository_owner == 'galaxyproject'
11-
uses: peter-evans/slash-command-dispatch@v3
11+
uses: peter-evans/slash-command-dispatch@v5
1212
with:
1313
token: ${{ secrets.PAT }}
1414
commands: |

0 commit comments

Comments
 (0)