-
Notifications
You must be signed in to change notification settings - Fork 49
77 lines (65 loc) · 2.07 KB
/
server-test.yaml
File metadata and controls
77 lines (65 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
76
77
name: Test for the server/ directory
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 45
permissions:
contents: read
env:
CACHE_DIR: .buildx-cache-${{ runner.os }}-${{ runner.arch }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Chrome
uses: browser-actions/setup-chrome@v2
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
cache-dependency-path: server/e2e/playwright/pnpm-lock.yaml
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "server/go.mod"
cache: true
- name: Restore Docker layer cache
uses: actions/cache@v4
with:
path: ${{ env.CACHE_DIR }}
key: buildx-${{ runner.os }}-${{ runner.arch }}-e2e-${{ hashFiles('images/**/Dockerfile', 'images/**/wrapper.sh', 'images/chromium-headful/client/package.json', 'images/chromium-headful/client/package-lock.json', 'server/go.mod', 'server/go.sum') }}
restore-keys: |
buildx-${{ runner.os }}-${{ runner.arch }}-e2e-
- name: Build chromium-headless image
shell: bash
env:
UKC_TOKEN: dummy
UKC_METRO: ci
run: |
bash images/chromium-headless/build-docker.sh
- name: Build chromium-headful image
shell: bash
env:
UKC_TOKEN: dummy
UKC_METRO: ci
run: |
bash images/chromium-headful/build-docker.sh
- name: Run server Makefile tests
run: make test
working-directory: server
env:
E2E_CHROMIUM_HEADFUL_IMAGE: onkernel/chromium-headful-test:latest
E2E_CHROMIUM_HEADLESS_IMAGE: onkernel/chromium-headless-test:latest