ci: split server test and release workflows — mixed paths+tags never fired
server-test / test (push) Successful in 1m3s
server-test / test (push) Successful in 1m3s
A push trigger that declares tags: stops matching branch pushes, and the paths filter doesn't apply to tag pushes — so the combined workflow could effectively never run. test-server.yml now covers branch pushes touching server/; build-server.yml is tags-only (server-v*). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
676a4d1eb8
commit
0c988df7e8
@@ -1,4 +1,4 @@
|
|||||||
# Server CI: tests on every push touching server/; on server-v* tags builds
|
# Server RELEASE: on server-v* tags builds
|
||||||
# and pushes the container image to the Gitea registry AND attaches static
|
# and pushes the container image to the Gitea registry AND attaches static
|
||||||
# binaries to a Gitea release (the artifact --self-update consumes).
|
# binaries to a Gitea release (the artifact --self-update consumes).
|
||||||
#
|
#
|
||||||
@@ -8,26 +8,13 @@
|
|||||||
# Required secrets: none beyond the built-in GITHUB_TOKEN — it can push to
|
# Required secrets: none beyond the built-in GITHUB_TOKEN — it can push to
|
||||||
# the registry of its own repo and create releases.
|
# the registry of its own repo and create releases.
|
||||||
|
|
||||||
name: server
|
name: server-release
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths: ["server/**", ".gitea/workflows/build-server.yml"]
|
|
||||||
tags: ["server-v*.*.*"]
|
tags: ["server-v*.*.*"]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
defaults: { run: { working-directory: server } }
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: actions/setup-go@v5
|
|
||||||
with: { go-version: "1.26", cache-dependency-path: server/go.mod }
|
|
||||||
- run: go vet ./...
|
|
||||||
- run: go test ./...
|
|
||||||
|
|
||||||
release:
|
release:
|
||||||
if: startsWith(github.ref, 'refs/tags/server-v')
|
|
||||||
needs: test
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
# Runs the server tests on every branch push touching server/.
|
||||||
|
# Release builds live in build-server.yml (server-v* tags) — kept separate
|
||||||
|
# because mixing `paths` and `tags` filters under one `push` trigger makes
|
||||||
|
# branch pushes stop matching (tags-only semantics).
|
||||||
|
|
||||||
|
name: server-test
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main, master]
|
||||||
|
paths: ["server/**", ".gitea/workflows/test-server.yml"]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
defaults: { run: { working-directory: server } }
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-go@v5
|
||||||
|
with: { go-version: "1.26", cache-dependency-path: server/go.mod }
|
||||||
|
- run: go vet ./...
|
||||||
|
- run: go test ./...
|
||||||
Reference in New Issue
Block a user