ci: test only for tags with 'test' in name
This commit is contained in:
+9
-10
@@ -10,9 +10,10 @@ on:
|
||||
|
||||
jobs:
|
||||
# ──────────────────────────────────────────────
|
||||
# TEST — all 3 components in parallel (always)
|
||||
# TEST — only for tags with "test" in name
|
||||
# ──────────────────────────────────────────────
|
||||
server-core-test:
|
||||
if: contains(gitea.ref_name, 'test')
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
@@ -29,6 +30,7 @@ jobs:
|
||||
run: go test ./... -tags dev -cover
|
||||
|
||||
device-agent-test:
|
||||
if: contains(gitea.ref_name, 'test')
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
@@ -45,6 +47,7 @@ jobs:
|
||||
run: go test ./... -cover
|
||||
|
||||
dashboard-test:
|
||||
if: contains(gitea.ref_name, 'test')
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
@@ -63,32 +66,28 @@ jobs:
|
||||
run: npm run build
|
||||
|
||||
# ──────────────────────────────────────────────
|
||||
# BUILD — only on tag push, parallel per component
|
||||
# BUILD — all tags, parallel per component
|
||||
# ──────────────────────────────────────────────
|
||||
build-server-core:
|
||||
if: startsWith(gitea.ref, 'refs/tags/')
|
||||
needs: [server-core-test]
|
||||
runs-on: ubuntu-latest
|
||||
uses: ./.gitea/workflows/build_server_core.yaml
|
||||
|
||||
build-device-agent:
|
||||
if: startsWith(gitea.ref, 'refs/tags/')
|
||||
needs: [device-agent-test]
|
||||
runs-on: ubuntu-latest
|
||||
uses: ./.gitea/workflows/build_device_agent.yaml
|
||||
|
||||
build-dashboard:
|
||||
if: startsWith(gitea.ref, 'refs/tags/')
|
||||
needs: [dashboard-test]
|
||||
runs-on: ubuntu-latest
|
||||
uses: ./.gitea/workflows/build_dashboard.yaml
|
||||
|
||||
build-docs:
|
||||
if: startsWith(gitea.ref, 'refs/tags/')
|
||||
runs-on: ubuntu-latest
|
||||
uses: ./.gitea/workflows/docs_call.yaml
|
||||
|
||||
# ──────────────────────────────────────────────
|
||||
# RELEASE — after all builds complete
|
||||
# ──────────────────────────────────────────────
|
||||
release:
|
||||
if: startsWith(gitea.ref, 'refs/tags/')
|
||||
needs: [build-server-core, build-device-agent, build-dashboard, build-docs]
|
||||
uses: ./.gitea/workflows/release_call.yaml
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user