Repository navigation
69 lines (66 loc) · 2.18 KB
/
Copy pathci.yml
File metadata and controls
69 lines (66 loc) · 2.18 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
name: ci
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
forms:
name: Shared forms browser QA
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Verify exact tested source
env:
EXPECTED_TEST_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
run: test "$(git rev-parse HEAD)" = "$EXPECTED_TEST_SHA"
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install isolated browser tooling
run: |
npm install --prefix "$RUNNER_TEMP/cms-ui" --no-audit --no-fund --save-exact playwright@1.61.1
"$RUNNER_TEMP/cms-ui/node_modules/.bin/playwright" install --with-deps chromium
- name: Exercise actual editor and platform forms
env:
CMS_PLAYWRIGHT_MODULE: ${{ runner.temp }}/cms-ui/package.json
CMS_UI_ARTIFACTS: ${{ runner.temp }}/cms-form-results
run: node adminui/testdata/form-usability.cjs
- uses: actions/upload-artifact@v4
if: always()
with:
name: cms-form-browser-results
path: ${{ runner.temp }}/cms-form-results
retention-days: 7
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:17-alpine
env:
POSTGRES_HOST_AUTH_METHOD: trust
ports: ['5432:5432']
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 5s
--health-timeout 5s
--health-retries 10
env:
CMS_TEST_DATABASE_URL: postgres://postgres@127.0.0.1:5432/postgres?sslmode=disable
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Verify exact tested source
env:
EXPECTED_TEST_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
run: test "$(git rev-parse HEAD)" = "$EXPECTED_TEST_SHA"
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
- run: go vet ./...
- run: go test -race ./...