4d58b01641
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) Successful in 1m45s
CI / build-device-agent (push) Failing after 2m29s
CI / build-dashboard (push) Successful in 1m14s
CI / build-docs (push) Has been skipped
CI / release (push) Has been skipped
123 lines
4.5 KiB
YAML
123 lines
4.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'dev-*'
|
|
- 'v*-dev*'
|
|
- 'v*-beta*'
|
|
- 'v*-test*'
|
|
- 'v[0-9]*.[0-9]*.[0-9]'
|
|
|
|
jobs:
|
|
# ====================================================================
|
|
# TESTS — test tags only
|
|
# ====================================================================
|
|
server-core-test:
|
|
if: contains(gitea.ref_name, 'test')
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
fetch-depth: 0
|
|
token: ${{ secrets.BUILD_TOKEN }}
|
|
persist-credentials: true
|
|
- name: Configure git auth for submodules
|
|
run: git config --global url."https://x-access-token:${{ secrets.BUILD_TOKEN }}@git.datadunia.com/".insteadOf "https://git.datadunia.com/"
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.26'
|
|
cache: true
|
|
- name: Test (skip nftables - needs root)
|
|
working-directory: apps/server-core
|
|
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:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
fetch-depth: 0
|
|
token: ${{ secrets.BUILD_TOKEN }}
|
|
persist-credentials: true
|
|
- name: Configure git auth for submodules
|
|
run: git config --global url."https://x-access-token:${{ secrets.BUILD_TOKEN }}@git.datadunia.com/".insteadOf "https://git.datadunia.com/"
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.26'
|
|
cache: true
|
|
- name: Test
|
|
working-directory: apps/device-agent
|
|
run: go test ./... -cover
|
|
|
|
dashboard-test:
|
|
if: contains(gitea.ref_name, 'test')
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
fetch-depth: 0
|
|
token: ${{ secrets.BUILD_TOKEN }}
|
|
persist-credentials: true
|
|
- name: Configure git auth for submodules
|
|
run: git config --global url."https://x-access-token:${{ secrets.BUILD_TOKEN }}@git.datadunia.com/".insteadOf "https://git.datadunia.com/"
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '24'
|
|
- name: Install
|
|
working-directory: apps/dashboard-ui
|
|
run: npm ci || npm install
|
|
- name: Build
|
|
working-directory: apps/dashboard-ui
|
|
run: npm run build
|
|
|
|
# ====================================================================
|
|
# BUILD — after tests pass (release) or directly (dev/beta)
|
|
# ====================================================================
|
|
build-server-core:
|
|
if: always() && !contains(gitea.ref_name, 'test') && !failure() && !cancelled()
|
|
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: always() && !contains(gitea.ref_name, 'test') && !failure() && !cancelled()
|
|
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: always() && !contains(gitea.ref_name, 'test') && !failure() && !cancelled()
|
|
needs: [server-core-test, device-agent-test, dashboard-test]
|
|
runs-on: ubuntu-latest
|
|
uses: ./.gitea/workflows/build_dashboard.yaml
|
|
secrets: inherit
|
|
|
|
# ====================================================================
|
|
# DOCS — after builds pass, release tags only
|
|
# ====================================================================
|
|
build-docs:
|
|
if: always() && !contains(gitea.ref_name, 'dev') && !contains(gitea.ref_name, 'beta') && !contains(gitea.ref_name, 'test') && !failure() && !cancelled()
|
|
needs: [build-server-core, build-device-agent, build-dashboard]
|
|
runs-on: ubuntu-latest
|
|
uses: ./.gitea/workflows/docs_call.yaml
|
|
secrets: inherit
|
|
|
|
# ====================================================================
|
|
# RELEASE — after everything passes
|
|
# ====================================================================
|
|
release:
|
|
if: always() && !contains(gitea.ref_name, 'test') && !failure() && !cancelled()
|
|
needs: [build-server-core, build-device-agent, build-dashboard, build-docs]
|
|
uses: ./.gitea/workflows/release_call.yaml
|
|
with:
|
|
prerelease: ${{ contains(gitea.ref_name, 'dev') }}
|
|
draft: ${{ contains(gitea.ref_name, 'beta') }}
|
|
secrets: inherit
|