Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: Test

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

permissions:
Expand Down
13 changes: 13 additions & 0 deletions context/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,19 @@ regions. Passing
not add a separate `cargo bake test` step to this job; the coverage task runs
the tests itself.

Filter both `push` and `pull_request` to `main`. Pull request updates then run
through `pull_request`, without a duplicate run from the feature-branch push;
merging to `main` still runs the workflow after the merge. Keep
`workflow_dispatch` for manual runs.

```yaml
name: Test

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -200,12 +207,18 @@ External compatibility testing is optional. Add
`.github/workflows/external.yml` only when the Cargo metadata list contains one
or more selected downstream repositories:

Use the same event filters as `test.yml`: pull requests targeting `main` and
pushes to `main`. This prevents duplicate downstream test runs for a pull
request branch while still checking the merged default branch.

```yaml
name: External Tests

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

permissions:
Expand Down
Loading