diff --git a/.github/workflows/_matrix-and-codecov-on-merge-to-main.yml b/.github/workflows/_matrix-and-codecov-on-merge-to-main.yml index 9b1eb6f..745c94a 100644 --- a/.github/workflows/_matrix-and-codecov-on-merge-to-main.yml +++ b/.github/workflows/_matrix-and-codecov-on-merge-to-main.yml @@ -23,6 +23,11 @@ on: default: false required: false type: boolean + run: + description: 'Extra CLI commands to run after installing the project' + default: 'echo "No extra commands"' + required: false + type: string secrets: CODECOV_TOKEN: description: 'Codecov token' @@ -73,6 +78,11 @@ jobs: fi python -m pip install . --no-deps + - name: Run extra user-defined CLI commands + run: | + echo "${{ inputs.run }}" > user-commands.sh + bash user-commands.sh + - name: Start Xvfb for ubuntu-latest only if: matrix.os == 'ubuntu-latest' && inputs.headless run: | diff --git a/.github/workflows/_tests-on-pr-no-codecov-no-headless.yml b/.github/workflows/_tests-on-pr-no-codecov-no-headless.yml index d420938..b5c0010 100644 --- a/.github/workflows/_tests-on-pr-no-codecov-no-headless.yml +++ b/.github/workflows/_tests-on-pr-no-codecov-no-headless.yml @@ -8,6 +8,11 @@ on: default: 3.13 required: false type: number + run: + description: 'Extra CLI commands to run after installing the project' + default: 'echo "No extra commands"' + required: false + type: string jobs: validate: @@ -40,6 +45,11 @@ jobs: conda install --file requirements/test.txt python -m pip install . --no-deps + - name: Run extra user-defined CLI commands + run: | + echo "${{ inputs.run }}" > user-commands.sh + bash user-commands.sh + - name: Run unit tests run: | pytest --cov diff --git a/news/configure-run.rst b/news/configure-run.rst new file mode 100644 index 0000000..a1d9cd4 --- /dev/null +++ b/news/configure-run.rst @@ -0,0 +1,23 @@ +**Added:** + +* Add optional run: commands for extra CLI commands in matrix and test-on-pr-no-codecov-no-headless CI. + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +*