ci: skip tests for dev/beta/release, test-only for test tags
CI / server-core-test (push) Has been skipped
CI / device-agent-test (push) Has been skipped
CI / dashboard-test (push) Has been skipped
CI / build-server-core (push) Failing after 4m46s
CI / build-dashboard (push) Failing after 1m17s
CI / build-docs (push) Failing after 1m5s
CI / release (push) Has been cancelled
CI / build-device-agent (push) Has been cancelled

- Test jobs: add if: contains(gitea.ref_name, 'test')
- Build jobs: remove needs dependency on tests
- dev/beta/release: build+release directly, no tests
- test tags: tests only, no build
This commit is contained in:
datadunia
2026-06-10 09:26:25 +07:00
parent 9470435704
commit bfb6dcc42f
+5 -4
View File
@@ -9,7 +9,9 @@ on:
- 'v[0-9]*.[0-9]*.[0-9]'
jobs:
# --- TESTS (only for test tags) ---
server-core-test:
if: contains(gitea.ref_name, 'test')
runs-on: ubuntu-latest
steps:
- name: Configure git auth for submodules
@@ -31,6 +33,7 @@ jobs:
run: go test $(go list ./... | grep -v internal/firewall) -tags dev -cover -count=1
device-agent-test:
if: contains(gitea.ref_name, 'test')
runs-on: ubuntu-latest
steps:
- name: Configure git auth for submodules
@@ -47,6 +50,7 @@ jobs:
run: go test ./... -cover
dashboard-test:
if: contains(gitea.ref_name, 'test')
runs-on: ubuntu-latest
steps:
- name: Configure git auth for submodules
@@ -65,30 +69,27 @@ jobs:
working-directory: apps/dashboard-ui
run: npm run build
# --- BUILD + RELEASE (only for dev/beta/release tags, no tests needed) ---
build-server-core:
if: "!contains(gitea.ref_name, 'test')"
needs: [server-core-test, device-agent-test, dashboard-test]
runs-on: ubuntu-latest
uses: ./.gitea/workflows/build_server_core.yaml
secrets: inherit
build-device-agent:
if: "!contains(gitea.ref_name, 'test')"
needs: [server-core-test, device-agent-test, dashboard-test]
runs-on: ubuntu-latest
uses: ./.gitea/workflows/build_device_agent.yaml
secrets: inherit
build-dashboard:
if: "!contains(gitea.ref_name, 'test')"
needs: [server-core-test, device-agent-test, dashboard-test]
runs-on: ubuntu-latest
uses: ./.gitea/workflows/build_dashboard.yaml
secrets: inherit
build-docs:
if: "!contains(gitea.ref_name, 'test')"
needs: [server-core-test, device-agent-test, dashboard-test]
runs-on: ubuntu-latest
uses: ./.gitea/workflows/docs_call.yaml
secrets: inherit