Files
carbon-lang/.github/workflows/tests-fallback.yaml
T
Chandler Carruth c75b41bb01 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).
2023-07-06 15:43:42 +00:00

47 lines
1.4 KiB
YAML

# Part of the Carbon Language project, under the Apache License v2.0 with LLVM
# Exceptions. See /LICENSE for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# Note that this name must exactly match the name in `tests.yaml`.
#
# This is not a real "test" workflow, but a fallback used to work around a
# problem where ignored checks cannot be required:
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore
name: test
# This mus exactly match the `on` clause in `tests.yaml` except for inverting
# `paths-ignore` to `paths`. The purpose is that exactly one of this workflow or
# the one in `tests.yaml` fires for a given case.
on:
push:
branches: [trunk]
paths:
- '**/*.md'
- 'LICENSE'
- 'CODEOWNERS'
- '.git*'
pull_request_target:
paths:
- '**/*.md'
- 'LICENSE'
- 'CODEOWNERS'
- '.git*'
merge_group:
paths:
- '**/*.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
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- run: 'echo "No tests to run."'