Repository navigation
55 lines (51 loc) · 2.03 KB
/
Copy pathpython-tests.yaml
File metadata and controls
55 lines (51 loc) · 2.03 KB
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
name: Python workflow Tests
on:
push:
# test-what-you-changed: only the python (conda) flavour's own paths trigger it
# (the always-on push trigger and the weekly full regression were removed
# 2026-09-22 — see ci.md). GitHub allows only `paths` OR `paths-ignore` per event,
# so the docker/singularity python flavours (workflow.docker.yml /
# workflow.singularity.yml, exercised by python-container-tests.yaml) are excluded
# by listing the conda-relevant files: the three standard config names are fixed
# by biobb convention, and the step input data lives in tests/python/ (covered by
# that glob). A change to only the two container configs must not re-run the
# pure-python (conda) tests.
paths:
- 'biobb_wf_*/tests/python/**'
- 'biobb_wf_*/python/workflow.yml'
- 'biobb_wf_*/python/workflow.env.yml'
- 'biobb_wf_*/python/workflow.py'
workflow_dispatch:
inputs:
wf_names:
description: 'Workflows to test, comma separated (empty = all)'
required: false
default: ''
type: string
# if you push twice quickly, cancel the older run
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
detect:
name: Detect workflows to test
uses: ./.github/workflows/detect.yaml
# the bot that syncs generated files (Dockerfiles, READMEs) is not a test trigger
if: github.actor != 'github-actions[bot]'
with:
wf_names: ${{ github.event.inputs.wf_names || '' }}
# without a flavour, require_path is empty and every wf is eligible
# (tests/<flavour>/SKIP is never consulted)
flavour: python
test:
name: ${{ matrix.wf }} (${{ matrix.runs_on }})
needs: detect
if: needs.detect.result == 'success' && needs.detect.outputs.matrix != '[]'
uses: ./.github/workflows/python-reusable.yaml
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(needs.detect.outputs.matrix) }}
with:
wf_name: ${{ matrix.wf }}
runs_on: ${{ matrix.runs_on }}