-
Notifications
You must be signed in to change notification settings - Fork 8.2k
53 lines (46 loc) · 1.64 KB
/
build.yml
File metadata and controls
53 lines (46 loc) · 1.64 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
name: Node.js CI
on:
push:
branches: ['master']
pull_request:
branches: ['master']
permissions:
contents: read
pull-requests: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ${{ matrix.os }}
env:
RUN_E2E: ${{ vars.RUN_E2E }} # from repository settings -> Actions -> Variables
strategy:
matrix:
node-version: [24.x]
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v6
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install
- run: npm run lint-check
- run: npm run test
# For testing in Windows CI, we need to limit the path to exclude the additional executables
# that the default github runner has, but are not on a vanilla Windows OS installation.
- if: ${{ (env.RUN_E2E == 'true' || github.repository == 'sahat/hackathon-starter') && matrix.os == 'windows-latest' }}
env:
PATH: 'C:\Windows\System32;C:\Windows'
run: npm run test:e2e:replay
# if not Windows, run normally
- if: ${{ (env.RUN_E2E == 'true' || github.repository == 'sahat/hackathon-starter') && matrix.os != 'windows-latest' }}
run: npm run test:e2e:replay
- name: Upload tmp as an artifact (Playwrite artifacts, code coverage report, etc)
if: always()
uses: actions/upload-artifact@v7
with:
name: tmp-artifacts-${{ matrix.os }}-${{ github.job }}-${{ github.run_id }}
path: tmp/**