1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

release-tests: add capability to run on PR comment

This commit is contained in:
Martine Lenders 2022-10-08 12:08:46 +02:00
parent cf0432f63d
commit cc32be4fe2
No known key found for this signature in database
GPG Key ID: 2134D77A5336DD80

View File

@ -12,6 +12,9 @@ name: release-tests
# dispatch. # dispatch.
on: on:
pull_request_review:
types:
- submitted
schedule: schedule:
- cron: '0 3 * * 6' - cron: '0 3 * * 6'
push: push:
@ -45,6 +48,7 @@ env:
jobs: jobs:
tasks: tasks:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
if: ${{ !github.event.review || (contains(github.event.review.body, '@riot-ci do release tests'))}}
timeout-minutes: 360 timeout-minutes: 360
strategy: strategy:
fail-fast: false fail-fast: false
@ -132,6 +136,10 @@ jobs:
fi fi
if [ -n "${{ github.event.inputs.filter }}" ]; then if [ -n "${{ github.event.inputs.filter }}" ]; then
K="-k" K="-k"
FILTER="${{ github.event.inputs.filter }}"
elif echo '${{ github.event.review.body }}' | tr '\n' ' ' | grep -i '@riot-ci do release tests with "[^"]\+"'; then
K="-k"
FILTER="$(echo '${{ github.event.review.body }}' | tr '\n' ' ' | sed 's/.*@riot-ci do release tests with "\([^"]\+\)".*/\1/i')"
fi fi
cd Release-Specs cd Release-Specs
@ -154,9 +162,10 @@ jobs:
TTN_APP_ID="release-tests" \ TTN_APP_ID="release-tests" \
TTN_DEV_ID="eui-70b3d57ed00463e7-otaa" \ TTN_DEV_ID="eui-70b3d57ed00463e7-otaa" \
TTN_DEV_ID_ABP="eui-70b3d57ed0046d5d-abp" \ TTN_DEV_ID_ABP="eui-70b3d57ed0046d5d-abp" \
PULL_REQUEST="${{ github.event.issue.pull_request.html_url }}" \
RIOTBASE=${RIOTBASE} \ RIOTBASE=${RIOTBASE} \
$(which tox) -e test -- ${TOX_ARGS} \ $(which tox) -e test -- ${TOX_ARGS} \
${K} "${{ github.event.inputs.filter }}" -m "${{ matrix.pytest_mark }}" ${K} "${FILTER}" -m "${{ matrix.pytest_mark }}"
- name: junit2html and XML deploy - name: junit2html and XML deploy
if: always() if: always()
run: | run: |