diff --git a/.github/workflows/validate-patch.yml b/.github/workflows/validate-patch.yml new file mode 100644 index 00000000..6ea8be62 --- /dev/null +++ b/.github/workflows/validate-patch.yml @@ -0,0 +1,29 @@ +# This file mirrors validate.yml and is designed to be a +# "stand-in" that always passes so that pull requests are not +# blocked waiting on the "Validate sample queries" workflow. +# For context, validate.yml will only run if specific files are +# updated in the PR. If a PR doesn't touch any of those files, +# validate.yml will never run, but since it's a required status +# check for PRs, the PR will be stuck waiting for the workflow to run. +# This file solves that problem. For more info, see +# https://github.com/orgs/community/discussions/44490 +name: Validate sample queries +on: + pull_request: + paths-ignore: + - sample-queries/sample-queries.json + - scripts/** + - tests/** + - package.json + - package-lock.json + +jobs: + validate-json-schema: + runs-on: ubuntu-latest + steps: + - run: 'echo "No validation required"' + + test: + runs-on: ubuntu-latest + steps: + - run: 'echo "No tests required"' diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 6b7009f8..26b670ff 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -1,5 +1,19 @@ name: Validate sample queries -on: [pull_request,push] +on: + push: + paths: + - sample-queries/sample-queries.json + - scripts/** + - tests/** + - package.json + - package-lock.json + pull_request: + paths: + - sample-queries/sample-queries.json + - scripts/** + - tests/** + - package.json + - package-lock.json jobs: validate-json-schema: @@ -18,8 +32,8 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Install - run: npm install + - name: Install + run: npm install - name: Run test run: npm run test