tests-fallback.yaml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. # Exceptions. See /LICENSE for license information.
  3. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. # Note that this name must exactly match the name in `tests.yaml`.
  5. #
  6. # This is not a real "test" workflow, but a fallback used to work around a
  7. # problem where ignored checks cannot be required:
  8. # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore
  9. name: test
  10. # This mus exactly match the `on` clause in `tests.yaml` except for inverting
  11. # `paths-ignore` to `paths`. The purpose is that exactly one of this workflow or
  12. # the one in `tests.yaml` fires for a given case.
  13. on:
  14. push:
  15. branches: [trunk]
  16. paths:
  17. - '**/*.md'
  18. - 'LICENSE'
  19. - 'CODEOWNERS'
  20. - '.git*'
  21. pull_request_target:
  22. paths:
  23. - '**/*.md'
  24. - 'LICENSE'
  25. - 'CODEOWNERS'
  26. - '.git*'
  27. merge_group:
  28. paths:
  29. - '**/*.md'
  30. - 'LICENSE'
  31. - 'CODEOWNERS'
  32. - '.git*'
  33. # Cancel previous workflows on the PR when there are multiple fast commits.
  34. # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
  35. concurrency:
  36. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  37. cancel-in-progress: true
  38. jobs:
  39. test:
  40. runs-on: ubuntu-latest
  41. steps:
  42. - run: 'echo "No tests to run."'