diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 113c7e7bab9..77e5701071b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,10 +33,13 @@ jobs: with: submodules: 'recursive' - id: envs + env: + GITHUB_EVENT_NAME: ${{ github.event_name }} + HAS_RUN_VERY_EXPENSIVE_LABEL: ${{ contains(github.event.pull_request.labels.*.name, 'run-very-expensive-tests') }} run: | - if [[ "${{ github.event_name }}" == "pull_request" && "${{ github.event.pull_request.labels.*.name }}" == *"run-very-expensive-tests"* ]]; then + if [[ "${GITHUB_EVENT_NAME}" = "pull_request" && "${HAS_RUN_VERY_EXPENSIVE_LABEL}" = "true" ]]; then echo "run_very_expensive_tests=1" >> $GITHUB_OUTPUT - elif [[ "${{ github.event_name }}" == "schedule"; then + elif [[ "${GITHUB_EVENT_NAME}" = "schedule" ]]; then echo "run_very_expensive_tests=1" >> $GITHUB_OUTPUT else echo "run_very_expensive_tests=0" >> $GITHUB_OUTPUT