Skip to content

Queue compile-tests (pull_request) #55

Queue compile-tests (pull_request)

Queue compile-tests (pull_request) #55

Workflow file for this run

name: Regression Suite Entry Point CI/CD
run-name : Queue ${{ github.event_name == 'push' && 'CI' || github.event.label.name }} (${{ github.event_name }})
on:
push:
branches: [ master, develop ]
# See https://stackoverflow.com/a/78444521 and
# https://github.com/orgs/community/discussions/26874#discussioncomment-3253755
# as well as official (but buried) documentation :
# https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull-request-events-for-forked-repositories-2
pull_request:
types: [ labeled ]
# Write our tests out this way for easier legibility
# testsSet :
# - key : value
# key : value
# tests :
# - value
# - value
# - < next test >
# https://stackoverflow.com/a/68940067
jobs:
queue_tests:
if : ${{ contains( fromJson('["compile-tests","all-tests"]'), github.event.label.name ) || github.event_name == 'push' }}
name: Queue Test (${{ github.event_name == 'push' && github.ref_name || github.event.label.name }})
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- name: Dispatch Regression Suite
run : |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ github.token }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${GITHUB_REPOSITORY}/actions/workflows/ci.yml/dispatches \
-d '{"ref":"${{ github.event_name == 'push' && github.ref_name || github.event.pull_request.base.ref }}","inputs":{"event_name":"${{ github.event_name }}", "event_number" : "${{ github.event.number }}", "test":"${{ github.event.label.name }}", "ref":"${{ github.ref }}"}}'