Repository navigation
72 lines (69 loc) · 2.52 KB
/
Copy pathtest.yml
File metadata and controls
72 lines (69 loc) · 2.52 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
name: Application
on:
push:
paths-ignore: ['**.md', 'THIRD_PARTY_LICENSES.txt', 'LICENSE']
pull_request:
paths-ignore: ['**.md', 'THIRD_PARTY_LICENSES.txt', 'LICENSE']
permissions:
contents: read
jobs:
native-tests:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6
with:
go-version-file: go.mod
cache: true
- name: Build, vet, and test on native runner
run: |
go build ./...
go vet ./...
go test -race ./...
contract:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6
with:
go-version-file: go.mod
- name: Verify formatting and generated request contract
run: |
test -z "$(gofmt -l cmd internal)"
go run ./cmd/contract > /tmp/openapi.json
diff -u docs/openapi.json /tmp/openapi.json
- name: Exercise real binary and persistent server
run: python3 scripts/smoke.py
admin-ui:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6
with:
go-version-file: go.mod
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: '22'
- name: Build service and install pinned Chromium test tools
run: |
go build -trimpath -o bin/agent-post ./cmd/agent-post
npm install --prefix "$RUNNER_TEMP/agent-post-ui-tools" --no-audit --no-fund playwright@1.62.1
"$RUNNER_TEMP/agent-post-ui-tools/node_modules/.bin/playwright" install --with-deps chromium
- name: Exercise English and all seven localized admin interfaces
env:
NODE_PATH: ${{ runner.temp }}/agent-post-ui-tools/node_modules
run: |
node --test internal/adminui/i18n.test.cjs
node scripts/browser-smoke.cjs
node scripts/browser-i18n-smoke.cjs
node scripts/browser-history-smoke.cjs