-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
105 lines (99 loc) · 2.82 KB
/
nodejs.yml
File metadata and controls
105 lines (99 loc) · 2.82 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Node CI
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- main
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
changes:
runs-on: ubuntu-latest
outputs:
cms: ${{ steps.filter.outputs.cms }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
cms:
- '!website/**'
build-unit:
needs: changes
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [24.x]
include:
- os: ubuntu-latest
node-version: 22.x
fail-fast: true
if: ${{ needs.changes.outputs.cms == 'true' }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
check-latest: true
cache: 'npm'
- name: log versions
run: node --version && npm --version
- name: install dependencies (skip Cypress binary)
run: npm ci
env:
CYPRESS_INSTALL_BINARY: 0
- name: run lint + types + unit tests
run: npm run test:ci
e2e:
needs: changes
if: ${{ needs.changes.outputs.cms == 'true' }}
runs-on: depot-ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Use Node.js 24.x
uses: actions/setup-node@v4
with:
node-version: 24.x
check-latest: true
cache: 'npm'
- name: Cache Nx local cache
uses: actions/cache@v4
with:
path: .nx/cache
key: nx-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
nx-${{ runner.os }}-
- name: Cache Cypress binary
uses: actions/cache@v4
with:
path: ~/.cache/Cypress
key: cypress-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
cypress-${{ runner.os }}-
- name: install dependencies
run: npm ci
- name: build demo site
run: npm run build:demo
- name: test package integrity
run: npm run test:package-integrity
- name: run e2e tests
run: npm run test:e2e:run-ci
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
NODE_OPTIONS: --max-old-space-size=4096
TZ: Europe/Amsterdam
GITHUB_EVENT_NAME: ${{ github.event_name }}
GITHUB_BASE_REF: ${{ github.base_ref }}
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-results
path: |
cypress/screenshots
cypress/videos