Add a fallback test workflow. (#2971)

To make this cleaner, this switches the main `test` workflow to use
exclusion path patterns as that was the clearly documented intent
anyways.

This works around a problem with required GitHub status checks:
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore

Without something like this, we won't be able to use the merge queue (or
require passing tests).
This commit is contained in:
Chandler Carruth
2023-07-06 15:43:42 +00:00
committed by GitHub
parent f992d4d960
commit c75b41bb01
2 changed files with 61 additions and 24 deletions
+15 -24
View File
@@ -7,32 +7,23 @@ name: test
on:
push:
branches: [trunk]
paths:
# Conservatively run the tests. However, skip them if the only paths in
# the pull request match files that we know don't impact the build.
- '**'
- '!**/*.md'
- '!LICENSE'
- '!CODEOWNERS'
- '!.git*'
paths-ignore:
- '**/*.md'
- 'LICENSE'
- 'CODEOWNERS'
- '.git*'
pull_request_target:
paths:
# Conservatively run the tests. However, skip them if the only paths in
# the pull request match files that we know don't impact the build.
- '**'
- '!**/*.md'
- '!LICENSE'
- '!CODEOWNERS'
- '!.git*'
paths-ignore:
- '**/*.md'
- 'LICENSE'
- 'CODEOWNERS'
- '.git*'
merge_group:
paths:
# Conservatively run the tests. However, skip them if the only paths in
# the pull request match files that we know don't impact the build.
- '**'
- '!**/*.md'
- '!LICENSE'
- '!CODEOWNERS'
- '!.git*'
paths-ignore:
- '**/*.md'
- 'LICENSE'
- 'CODEOWNERS'
- '.git*'
# Cancel previous workflows on the PR when there are multiple fast commits.
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency