Skip to content

Commit

Permalink
github: allow embedding extra args in test names
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Deziel <[email protected]>
  • Loading branch information
simondeziel authored and MusicDin committed Feb 14, 2024
1 parent 74cac7c commit 536da92
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,11 @@ jobs:
- name: ${{ matrix.test }} (${{ matrix.track }})
run: |
set -eux
if [ "${{ matrix.test }}" = "cluster" ]; then
TEST_SCRIPT="$(echo ${{ matrix.test }} | cut -d " " -f 1)"
EXTRA_ARGS="$(echo ${{ matrix.test }} | cut -d " " -f 2- --only-delimited)"
if [ "${TEST_SCRIPT}" = "cluster" ]; then
dst_track="${{ matrix.track }}"
src_track="$(echo "${dst_track}" | cut -d/ -f1)/stable"
EXTRA_ARGS="3 ${src_track} ${{ matrix.track }}"
EXTRA_ARGS="${EXTRA_ARGS:-3} ${src_track} ${{ matrix.track }}"
fi
sudo --preserve-env=PURGE_LXD,TEST_IMG ./bin/local-run tests/${{ matrix.test }} ${{ matrix.track }} ${EXTRA_ARGS:-}
sudo --preserve-env=PURGE_LXD,TEST_IMG ./bin/local-run "tests/${TEST_SCRIPT}" ${{ matrix.track }} ${EXTRA_ARGS:-}

0 comments on commit 536da92

Please sign in to comment.