Files
overlord/.gitlab/ci/tests.yml
T

87 lines
2.4 KiB
YAML

.server-test-rules:
rules:
- if: '$CI_PIPELINE_SOURCE == "web" && $RELEASE_VERSION != ""'
when: never
- changes:
- Overlord-Server/**/*
- Overlord-Client/cmd/agent/wire/wire_contract_generated.go
- protocol/**/*
- scripts/generate-wire-protocol.ts
- .gitlab-ci.yml
- .gitlab/ci/tests.yml
.client-test-rules:
rules:
- if: '$CI_PIPELINE_SOURCE == "web" && $RELEASE_VERSION != ""'
when: never
- changes:
- Overlord-Client/**/*
- protocol/**/*
- scripts/generate-wire-protocol.ts
- go.work
- go.work.sum
- .gitlab-ci.yml
- .gitlab/ci/tests.yml
server-tests-linux:
extends: .server-test-rules
stage: test
image: oven/bun:1.3.14
script:
- cd Overlord-Server
- bun install --frozen-lockfile
- bun run typecheck
- bun run protocol:check
- bun run test
server-tests-windows:
extends: .server-test-rules
stage: test
tags:
- saas-windows-medium-amd64
before_script:
- npm install --global --prefix "$env:CI_PROJECT_DIR\.tools" bun@1.3.14
- $env:PATH = "$env:CI_PROJECT_DIR\.tools;$env:PATH"
script:
- Set-Location Overlord-Server
- bun install --frozen-lockfile
- bun run typecheck
- bun run protocol:check
- bun run test
server-e2e-tests:
extends: .server-test-rules
stage: test
image: oven/bun:1.3.14
script:
- cd Overlord-Server
- bun install --frozen-lockfile
- bunx playwright install --with-deps chromium
- bun run test:e2e
client-tests-linux:
extends: .client-test-rules
stage: test
image: golang:1.26-bookworm
script:
- cd Overlord-Client
- go mod download
- go test ./...
client-tests-windows:
extends: .client-test-rules
stage: test
tags:
- saas-windows-medium-amd64
before_script:
- $GoVersion = ((Select-String -Path Overlord-Client/go.mod -Pattern '^go ').Line -split '\s+')[1]
- Invoke-WebRequest -UseBasicParsing "https://go.dev/dl/go$GoVersion.windows-amd64.zip" -OutFile "$env:CI_PROJECT_DIR\go.zip"
- Expand-Archive -Path "$env:CI_PROJECT_DIR\go.zip" -DestinationPath "$env:CI_PROJECT_DIR\.toolchains" -Force
- $env:PATH = "$env:CI_PROJECT_DIR\.toolchains\go\bin;$env:PATH"
script:
- bash scripts/vendor-onevpl-headers.sh
- bash scripts/vendor-amf-headers.sh
- Set-Location Overlord-Client
- go mod download
- go test ./...