-
Notifications
You must be signed in to change notification settings - Fork 19
89 lines (75 loc) · 2.71 KB
/
auth-ui-end-to-end-tests.yml
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
78
79
80
81
82
83
84
85
86
87
88
89
name: Auth UI End to End Tests
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
auth-ui-end-to-end-tests:
runs-on: ubuntu-latest
defaults:
run:
working-directory: src
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/cache@v4
env:
cache-name: cache-pnpm-modules
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-
- uses: pnpm/[email protected]
with:
version: 9.15.3
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: "pnpm"
cache-dependency-path: src/pnpm-lock.yaml
- name: 🔥 Initialize MySQL
run: sudo systemctl start mysql.service
- name: Install dependencies
run: pnpm i
- name: Build CLI tool
run: pnpm build
- name: Install Playwright's dependencies
working-directory: src/packages/end-to-end
run: pnpm playwright install --with-deps chromium
- name: Build and Setup Rest Database
working-directory: src/packages/end-to-end
timeout-minutes: 4
run: |
pnpm import-auth
env:
CI: true
DATABASE_HOST: 127.0.0.1
DATABASE_USERNAME: root
DATABASE_PASSWORD: root
- name: Make envfile
uses: SpicyPizza/[email protected]
with:
envkey_REST_BASE_URL: "https://swapi.info/api"
envkey_DATABASE_HOST: 127.0.0.1
envkey_DATABASE_USERNAME: root
envkey_DATABASE_PASSWORD: root
envkey_AUTH_PUBLIC_KEY_PEM_BASE64: "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFcVFSUC9nem1ZdVJyR012UzJxeXpLaU05c0Z2aQpyWFRWVUsrMDBHaFFDa2NhdThOcWZsWG9nOEhyTkVsalkwWWpYcVVqOCs2ZDlySkEwTHo0NmFGSmp3PT0KLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tCg=="
envkey_AUTH_PRIVATE_KEY_PEM_BASE64: ${{ secrets.AUTH_PRIVATE_KEY_PEM_BASE64 }}
envkey_AUTH_WHITELIST_DOMAINS: localhost
directory: src/packages/end-to-end/app
- name: Start and Test Rest With Auth Example
working-directory: src/packages/end-to-end
timeout-minutes: 4
run: |
pnpm start-server &
sleep 5 &&
pnpm test-ui-auth &&
killall node
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: src/packages/end-to-end/playwright-report/
retention-days: 30
env:
CI: true