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