-
Notifications
You must be signed in to change notification settings - Fork 3
67 lines (64 loc) · 2.24 KB
/
Copy pathpush.yml
File metadata and controls
67 lines (64 loc) · 2.24 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
name: Push Workflow
on:
# When after commit pushed to branches not master nad release/next
push:
branches-ignore:
- 'master'
concurrency:
group: ci-push-${{ github.ref }}
cancel-in-progress: true
env:
CI: true
jobs:
init:
name: 'Install, Build and Test'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Read .nvmrc
id: nvm
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT
- name: Use Node.js ${{ steps.nvm.outputs.NODE_VERSION }}
uses: actions/setup-node@v2
with:
node-version: ${{ steps.nvm.outputs.NODE_VERSION }}
- run: yarn clean
- run: yarn install
- run: yarn build
- name: Install dependencies
run: |
sudo apt-get update
- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium
- name: Unit tests (vitest)
working-directory: packages/nextjs
run: yarn test:unit:coverage
- name: Upload unit coverage
uses: actions/upload-artifact@v4
with:
name: unit-coverage
path: packages/nextjs/coverage
retention-days: 14
- name: Run Playwright tests
run: npx playwright test
env:
DEBUG: "pw:webserver"
FRONTEGG_TEST_URL: "http://localhost:3001"
FRONTEGG_APP_URL: "http://localhost:3000"
FRONTEGG_BASE_URL: "https://demo.frontegg.com"
FRONTEGG_CLIENT_ID: "b6adfe4c-d695-4c04-b95f-3ec9fd0c6cca"
FRONTEGG_ENCRYPTION_PASSWORD: "7adec29c60414777b30814da94db2263d8db827cd8d59c68434225e661b17eba"
- name: Run Playwright tests (packages/nextjs)
working-directory: packages/nextjs
run: npx playwright test --project=unit-playwright --project=e2e-mocked
env:
FRONTEGG_APP_URL: "http://localhost:3000"
FRONTEGG_BASE_URL: "https://demo.frontegg.com"
FRONTEGG_CLIENT_ID: "b6adfe4c-d695-4c04-b95f-3ec9fd0c6cca"
FRONTEGG_ENCRYPTION_PASSWORD: "7adec29c60414777b30814da94db2263d8db827cd8d59c68434225e661b17eba"
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 14