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
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,20 @@ permissions:
contents: read

jobs:
# Skip on `chore(release):` push commits across every job that
# resolves Go module versions (`test`, `lint`, `tidy`). PR runs
# are unaffected because the filter checks `head_commit.message`
# which is null for `pull_request` events.
#
# The dogfood: monorel's own `ci/github/README.md` documents this
# recipe (Recipes -> "Skipping CI on chore(release) commits") for
# downstream consumers; this workflow demonstrates it in monorel's
# own setup. Today monorel is single-module so the chore(release)
# commit doesn't add new versions to its go.sum and the race the
# filter prevents wouldn't bite. Forward-compatible if monorel
# ever grows sub-modules.
test:
if: github.event_name == 'pull_request' || !startsWith(github.event.head_commit.message, 'chore(release):')
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -26,6 +39,7 @@ jobs:
- run: go test -race -count=1 ./...

lint:
if: github.event_name == 'pull_request' || !startsWith(github.event.head_commit.message, 'chore(release):')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -44,6 +58,7 @@ jobs:
- run: staticcheck ./...

tidy:
if: github.event_name == 'pull_request' || !startsWith(github.event.head_commit.message, 'chore(release):')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/e2e-gitea.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ permissions:

jobs:
e2e:
# Skip on chore(release) push commits. The e2e suite spins up a
# Forgejo container and exercises monorel against an ephemeral
# repo inside it; nothing about the chore(release) merge changes
# the suite's behavior, so re-running it on the release commit
# just burns CI minutes.
if: github.event_name != 'push' || !startsWith(github.event.head_commit.message, 'chore(release):')
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
Expand Down
Loading