32 lines
1.0 KiB
YAML
32 lines
1.0 KiB
YAML
name: Test
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
name: Test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Run check tests
|
|
run: bash test/run-tests.sh
|
|
# Monitor: the org-wide gate is fail-open, so alert if the org variable
|
|
# that configures it is ever empty.
|
|
- name: Org variable REQUIRED_PR_LABELS is configured
|
|
env:
|
|
REQUIRED_PR_LABELS: ${{ vars.REQUIRED_PR_LABELS }}
|
|
run: |
|
|
if [ -z "${REQUIRED_PR_LABELS}" ]; then
|
|
echo "::error::Org variable REQUIRED_PR_LABELS is empty; the required-labels gate is disabled."
|
|
exit 1
|
|
fi
|
|
echo "REQUIRED_PR_LABELS=${REQUIRED_PR_LABELS}"
|
|
# Verifies that the self: ref used by the scoped workflow resolves on the
|
|
# runner. Empty labels -> the check passes, which is all we need here.
|
|
- name: Verify action ref resolves
|
|
uses: https://gitea.kosmos.org/kosmos/actions/required-labels@v1
|
|
with:
|
|
labels: ""
|