-
Notifications
You must be signed in to change notification settings - Fork 16
122 lines (98 loc) · 2.76 KB
/
Copy pathreact.yml
File metadata and controls
122 lines (98 loc) · 2.76 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: RunTests
on: [push, pull_request]
jobs:
test_frontend:
timeout-minutes: 2
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: ['24', '25', '26']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
- name: Cache npm
uses: actions/cache@v5
with:
path: ~/.npm
key: ${{ runner.os }}-${{ matrix.node }}-node-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
run: |
npm ci
- name: Run format
run: |
npm run format
- name: Run lint
run: |
npm run lint
- name: Run typecheck
run: |
npm run typecheck
- name: Run tests
run: |
npm run test
test_e2e:
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
# Seems to hang on node 24 and 26 https://github.com/microsoft/playwright/issues/40724
node: ['25']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Set up Node ${{ matrix.node }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
- name: Cache npm
uses: actions/cache@v5
with:
path: ~/.npm
key: ${{ runner.os }}-${{ matrix.node }}-node-${{ hashFiles('**/package-lock.json') }}
- name: Install npm dependencies
run: |
npm ci
- name: Install playwright dependencies
run: |
npx playwright install --with-deps chromium
- name: Run e2e tests
run: |
npm run teste2e
deploy_frontend:
strategy:
matrix:
os: [ubuntu-latest]
node: ['26']
runs-on: ${{ matrix.os }}
needs: [test_frontend, test_e2e]
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v6
- name: Set up Node ${{ matrix.node }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
- name: Cache npm
uses: actions/cache@v5
with:
path: ~/.npm
key: ${{ runner.os }}-${{ matrix.node }}-node-production-${{ hashFiles('**/package-lock.json') }}
- name: Install npm dependencies
run: |
npm ci
- name: Build
run: |
npm run build
- name: Publish to Github Pages
if: github.ref == 'refs/heads/master'
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.GITHUB_PAGES_TOKEN }}
BASE_BRANCH: master # The branch the action should deploy from.
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: build # The folder the action should deploy.