Files
Nexus-Guard-Suite/.gitea/workflows/ci.yml
T
datadunia 5b5a4aa009
CI / server-core-test (push) Failing after 18s
CI / device-agent-test (push) Failing after 14s
CI / dashboard-test (push) Failing after 15s
CI / build-server-core (push) Has been skipped
CI / build-device-agent (push) Has been skipped
CI / build-dashboard (push) Has been skipped
CI / build-docs (push) Has been skipped
CI / release (push) Has been skipped
ci: add BUILD_TOKEN for submodule checkout authentication
2026-06-10 04:26:22 +07:00

99 lines
2.6 KiB
YAML

name: CI
on:
push:
tags:
- 'dev-*'
- 'v*-beta*'
- 'v*-test*'
- 'v[0-9]*.[0-9]*.[0-9]'
jobs:
server-core-test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: apps/server-core
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
token: ${{ secrets.BUILD_TOKEN }}
persist-credentials: true
- uses: actions/setup-go@v5
with:
go-version: '1.26'
- name: Test
run: go test ./... -tags dev -cover
device-agent-test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: apps/device-agent
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
token: ${{ secrets.BUILD_TOKEN }}
persist-credentials: true
- uses: actions/setup-go@v5
with:
go-version: '1.26'
- name: Test
run: go test ./... -cover
dashboard-test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: apps/dashboard-ui
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
token: ${{ secrets.BUILD_TOKEN }}
persist-credentials: true
- uses: actions/setup-node@v4
with:
node-version: '24'
- name: Install
run: npm ci || npm install
- name: Build
run: npm run build
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
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
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
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
release:
if: "!contains(gitea.ref_name, 'test')"
needs: [build-server-core, build-device-agent, build-dashboard, build-docs]
uses: ./.gitea/workflows/release_call.yaml
with:
prerelease: ${{ contains(gitea.ref_name, 'dev-') || contains(gitea.ref_name, 'beta') }}
secrets: inherit