From bfb6dcc42f9c486671a467ae635b159206ac51ac Mon Sep 17 00:00:00 2001 From: datadunia Date: Wed, 10 Jun 2026 09:26:25 +0700 Subject: [PATCH] ci: skip tests for dev/beta/release, test-only for test tags - 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 --- .gitea/workflows/ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 8edc0a9..ba3753e 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -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