diff --git a/.github/workflows/schema-tests.yaml b/.github/workflows/schema-tests.yaml index eb39b414b0..7a3116936d 100644 --- a/.github/workflows/schema-tests.yaml +++ b/.github/workflows/schema-tests.yaml @@ -9,8 +9,7 @@ name: schema-test # # run this on push to any branch and creation of pull-requests -on: - push: {} +on: pull_request: {} workflow_dispatch: {} @@ -33,3 +32,5 @@ jobs: - name: Run tests run: npm run test + env: + BASE: ${{ github.event.pull_request.base.ref }} diff --git a/scripts/schema-test-coverage.sh b/scripts/schema-test-coverage.sh index f00b661b0b..600199b907 100755 --- a/scripts/schema-test-coverage.sh +++ b/scripts/schema-test-coverage.sh @@ -6,8 +6,6 @@ [[ ! -e src/schemas ]] && exit 0 -branch=$(git branch --show-current) - echo echo "Schema Test Coverage" echo @@ -15,4 +13,4 @@ echo node scripts/schema-test-coverage.mjs src/schemas/validation/schema-base.yaml tests/schema/pass rc=$? -[[ "$branch" == "dev" ]] || exit $rc +[[ "$BASE" == "dev" ]] || exit $rc