-
Notifications
You must be signed in to change notification settings - Fork 19
70 lines (54 loc) · 1.84 KB
/
pull-request.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
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Pull Request Prerequisite Checks
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v3
with:
main-branch-name: ${{ github.base_ref }}
- name: Setup Node.js
uses: ./.github/actions/node-step
with:
npm-auth-token: ${{ secrets.NPM_TOKEN }}
- name: Build app
run: npm run affected:build
- name: Check Formatting
run: npm run format:check
- name: Unit test
run: npm run affected:test
- name: Check Linting
run: npm run affected:lint
playwright:
name: "Playwright Tests"
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.32.1-focal
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: ./.github/actions/node-step
with:
npm-auth-token: ${{ secrets.NPM_TOKEN }}
- name: Install browsers
run: npx playwright install --with-deps chromium firefox webkit
shell: bash
- name: Run Playwright e2e tests
run: HOME=/root npm run e2e
- name: Run Playwright e2e responsive tests with mocks
run: HOME=/root npm run e2e-test-responsive
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 7