-
Notifications
You must be signed in to change notification settings - Fork 928
75 lines (61 loc) · 2.07 KB
/
Copy pathci.yml
File metadata and controls
75 lines (61 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: CI
on:
push:
pull_request:
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version-file: server/go.mod
cache-dependency-path: server/go.sum
- uses: pnpm/action-setup@v4
with:
version: 11.19.0
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- name: Test Go server
working-directory: server
run: |
test -z "$(gofmt -l .)"
go vet ./...
go test -race ./...
CGO_ENABLED=0 go build -trimpath -o /tmp/serverstatus .
- name: Check clients, WebUI and shell scripts
run: |
python3 -m py_compile clients/client-linux.py clients/client-psutil.py
python3 -m unittest discover -s clients -p 'test_*.py'
sh -n clients/entrypoint.sh
sh -n tests/run-webui-server.sh tests/docker-smoke.sh
bash -n status.sh
node --check web/js/app.js
node --check tests/webui/webui.spec.js
node --check playwright.config.js
- name: Test WebUI in Chromium
run: |
pnpm install --frozen-lockfile
pnpm exec playwright install --with-deps chromium
pnpm test:webui
- name: Validate compose files
run: |
docker compose -f docker-compose-server.yml config
docker compose -f docker-compose-client.yml config
- name: Build Docker images
run: |
docker build -f Dockerfile.server -t serverstatus-server:test .
docker build -f Dockerfile.client -t serverstatus-client:test .
- name: Test Docker server-client connection
run: tests/docker-smoke.sh
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- name: Build client image for AMD64 and ARM64
run: |
docker buildx build \
--platform linux/amd64,linux/arm64 \
--file Dockerfile.client \
--output type=cacheonly \
.