From e7ef934872adca07bd3c154770b13c7675fbc626 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Mon, 3 May 2021 15:58:17 +0200 Subject: [PATCH] gh-actions: release-tests: add filter input This way, the tests that shall be run can be determined using [`pytest -k` expressions][k]. E.g. `spec04 and task04` would only run task 4.4. [k]: https://docs.pytest.org/en/stable/usage.html#specifying-tests-selecting-tests --- .github/workflows/release-test.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-test.yml b/.github/workflows/release-test.yml index 97e58d4b37..e94920af85 100644 --- a/.github/workflows/release-test.yml +++ b/.github/workflows/release-test.yml @@ -34,6 +34,9 @@ on: description: 'riot/riotbuild docker image version' required: true default: 'latest' + filter: + description: 'Pytest filter. Leave empty for all.' + required: false env: DOCKER_MAKE_ARGS: -j @@ -116,6 +119,9 @@ jobs: grep -q "[0-9]\{4\}.[0-9]\{2\}-RC[0-9]\+"; then TOX_ARGS+="--non-RC " fi + if [ -n "${{ github.event.inputs.filter }}" ]; then + K="-k" + fi cd Release-Specs # definition in env does not work since $GITHUB_WORKSPACE seems not to @@ -138,7 +144,8 @@ jobs: TTN_DEV_ID="riot_lorawan_1" \ TTN_DEV_ID_ABP="riot_lorawan_1_abp" \ RIOTBASE=${RIOTBASE} \ - $(which tox) -e test -- ${TOX_ARGS} -m "${{ matrix.pytest_mark }}" + $(which tox) -e test -- ${TOX_ARGS} \ + ${K} "${{ github.event.inputs.filter }}" -m "${{ matrix.pytest_mark }}" - name: junit2html and XML deploy if: always() run: |