-
Notifications
You must be signed in to change notification settings - Fork 2
74 lines (62 loc) · 2.09 KB
/
test.yaml
File metadata and controls
74 lines (62 loc) · 2.09 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
name: Tests
on:
# Allow workflow to be called by another workflow
workflow_call:
secrets:
VITE_AUTH_URL:
description: 'The base URL of the KAuth backend, e.g. https://global.api.konghq.tech'
required: true
# Allow workflow to be called manually
workflow_dispatch:
inputs:
VITE_AUTH_URL:
description: 'The base URL of the KAuth backend, e.g. https://global.api.konghq.tech'
type: string
default: https://global.api.konghq.tech
required: false
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Harden Runner
uses: step-security/harden-runner@fe104658747b27e96e4f7e80cd0a94068e53901d # v2.16.1
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
registry-url: https://registry.npmjs.org
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Stylelint
run: yarn stylelint
- name: Lint
run: yarn lint
- name: Typecheck
run: yarn typecheck
- name: Run Cypress component tests
uses: cypress-io/github-action@783cb3f07983868532cabaedaa1e6c00ff4786a8 # v7.1.9
with:
install: false
command: yarn test
env:
VITE_AUTH_URL: ${{ secrets.VITE_AUTH_URL || inputs.VITE_AUTH_URL }}
- name: Upload Cypress screenshots (on failure)
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
if: failure()
with:
name: cypress_screenshots
path: cypress/screenshots/
- name: Upload Cypress videos (always)
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
if: always()
with:
name: cypress_videos
path: cypress/videos/