-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (47 loc) · 1.62 KB
/
build-test.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
name: Validate PR
on:
pull_request:
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-test:
name: Build and test
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.44.0-jammy
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Node Setup 20.x
uses: actions/setup-node@v4
with:
cache: npm
node-version: 20.x
- uses: bahmutov/npm-install@v1
with:
# We can't use our lockfile, because of platform-specific optional dependencies in Vite
# https://github.com/npm/cli/issues/4828
# Will create errors like: `Error: Cannot find module @rollup/rollup-linux-x64-gnu.`
useLockFile: false
- name: Lint (via Turbo)
run: npm run lint
- name: Build (via Turbo)
run: npm run build
- name: Test (via Turbo)
run: npm test
env:
# For Playwright -- Firefox is unable to launch if the $HOME folder isn't owned by the current user.
HOME: /root
# Uploads the playwright test results folder, this has HTML and video of failures in it
- uses: actions/upload-artifact@v4
with:
name: test-results
# If nothing is found, then we have a configuration error
# The reports should always exist, even on success
if-no-files-found: error
# Bring other test results into this one artefact (if other packages get them)
path: |
packages/react/.end2end-report