-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This attempts to configure the [Trunk Merge Queue](https://docs.trunk.io/merge/set-up-trunk-merge) in a way that would allow us to have separate required checks for Pull Requests and the Merge Queue. I've refactored the jobs into `reusable-test.yml` and `reusable-examples.yml` workflows and then consume them via `push.yml`, `pull-request.yml` and `merge-queue.yml`. I'm experimenting with this separation because it seems easier to manage the context per event instead of "per task".
- Loading branch information
1 parent
29b1a2e
commit 4f5fa08
Showing
6 changed files
with
77 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Merge Queue | ||
|
||
on: | ||
# We use Trunk Merge Queues so we use this `push` event instead of the | ||
# `merge_queue` event, as per | ||
# https://docs.trunk.io/merge/set-up-trunk-merge#configure-merge-requirements | ||
push: | ||
branches: | ||
- trunk-merge/** | ||
|
||
jobs: | ||
test: | ||
name: Run tests | ||
uses: ./.github/workflows/reusable-test.yml | ||
|
||
examples: | ||
name: Build examples | ||
uses: ./.github/workflows/reusable-examples.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Pull Request | ||
|
||
on: | ||
pull_request: | ||
# Recommended by Graphite: https://graphite.dev/docs/github-configuration-guidelines#github-actions | ||
types: [opened, synchronize, reopened] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
name: Run tests | ||
uses: ./.github/workflows/reusable-test.yml | ||
|
||
examples: | ||
name: Build examples | ||
uses: ./.github/workflows/reusable-examples.yml |
22 changes: 17 additions & 5 deletions
22
.github/workflows/release.yml → .github/workflows/push.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 4 additions & 6 deletions
10
.github/workflows/test.yml → .github/workflows/reusable-test.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters