Skip to content

Commit cb11fd8

Browse files
authored
Merge pull request #170 from bobleesj/configure-run
ci: add optional CLI commands in matrix CI and test-on-pr-no-codecov
2 parents f2a31d4 + e72f308 commit cb11fd8

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

.github/workflows/_matrix-and-codecov-on-merge-to-main.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ on:
2323
default: false
2424
required: false
2525
type: boolean
26+
run:
27+
description: 'Extra CLI commands to run after installing the project'
28+
default: 'echo "No extra commands"'
29+
required: false
30+
type: string
2631
secrets:
2732
CODECOV_TOKEN:
2833
description: 'Codecov token'
@@ -73,6 +78,11 @@ jobs:
7378
fi
7479
python -m pip install . --no-deps
7580
81+
- name: Run extra user-defined CLI commands
82+
run: |
83+
echo "${{ inputs.run }}" > user-commands.sh
84+
bash user-commands.sh
85+
7686
- name: Start Xvfb for ubuntu-latest only
7787
if: matrix.os == 'ubuntu-latest' && inputs.headless
7888
run: |

.github/workflows/_tests-on-pr-no-codecov-no-headless.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ on:
88
default: 3.13
99
required: false
1010
type: number
11+
run:
12+
description: 'Extra CLI commands to run after installing the project'
13+
default: 'echo "No extra commands"'
14+
required: false
15+
type: string
1116

1217
jobs:
1318
validate:
@@ -40,6 +45,11 @@ jobs:
4045
conda install --file requirements/test.txt
4146
python -m pip install . --no-deps
4247
48+
- name: Run extra user-defined CLI commands
49+
run: |
50+
echo "${{ inputs.run }}" > user-commands.sh
51+
bash user-commands.sh
52+
4353
- name: Run unit tests
4454
run: |
4555
pytest --cov

news/configure-run.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
**Added:**
2+
3+
* Add optional run: commands for extra CLI commands in matrix and test-on-pr-no-codecov-no-headless CI.
4+
5+
**Changed:**
6+
7+
* <news item>
8+
9+
**Deprecated:**
10+
11+
* <news item>
12+
13+
**Removed:**
14+
15+
* <news item>
16+
17+
**Fixed:**
18+
19+
* <news item>
20+
21+
**Security:**
22+
23+
* <news item>

0 commit comments

Comments
 (0)