forked from PaloAltoNetworks/docusaurus-openapi-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (51 loc) · 2.2 KB
/
Copy paththeme-ci.yml
File metadata and controls
54 lines (51 loc) · 2.2 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
name: Theme CI
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
jobs:
validate:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24
cache: yarn
- run: yarn install --frozen-lockfile --ignore-scripts
- run: yarn workspace @aeei/docusaurus-theme build
- name: Theme contracts
run: >-
NODE_OPTIONS=--experimental-vm-modules yarn jest
packages/docusaurus-theme/src/package-contract.test.ts
packages/docusaurus-theme/src/theme/base-ui-contract.test.ts
packages/docusaurus-theme/src/theme/icon-contract.test.ts
packages/docusaurus-theme/src/theme/navbar-shell-contract.test.ts
packages/docusaurus-theme/src/theme/paginator-contract.test.ts
packages/docusaurus-theme/src/theme/prose-contract.test.ts
packages/docusaurus-theme/src/theme/registry-source-contract.test.ts
packages/docusaurus-theme/src/theme/sidebar-contract.test.ts
packages/docusaurus-theme/src/theme/style-contract.test.ts
examples/docs-starter/config-contract.test.ts
--runInBand
- run: yarn workspace @aeei/docs-starter build
- name: Package contents
working-directory: packages/docusaurus-theme
run: npm pack --dry-run
- run: npx playwright install --with-deps chromium
- name: Browser matrix
run: >-
yarn start-server-and-test
"yarn workspace @aeei/docs-starter serve --host 127.0.0.1 --port 3001 --no-open"
http://127.0.0.1:3001/docusaurus-theme/
"node scripts/audit-docs-starter.cjs && node scripts/audit-critical-ui-relations.cjs && PLAYWRIGHT_BASE_URL=http://127.0.0.1:3001/docusaurus-theme/ yarn test:e2e:theme"
- name: Upload browser failures
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: docs-starter-browser-failures
path: artifacts/docs-starter
if-no-files-found: ignore