-
Notifications
You must be signed in to change notification settings - Fork 659
63 lines (59 loc) · 1.56 KB
/
Build and 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
58
59
60
61
62
63
name: 'CICD pipeline'
on:
push:
branches: '*'
pull_request:
branches: '*'
jobs:
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Bulid from src
uses: actions/setup-node@v4
with:
node-version: '20.x'
- run: yarn install --frozen-lockfile
- run: yarn build-only
- uses: actions/upload-artifact@master
with:
name: dist
path: dist/
- run: tar -cvf node_modules.tar node_modules
- uses: actions/upload-artifact@master
with:
name: node_modules
path: node_modules.tar
test_node:
needs: Build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [15.x, 16.x, 17.x, 18.x, 19.x, latest]
steps:
- uses: actions/checkout@v4
- name: Run prod version with Node v${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: actions/download-artifact@master
with:
name: dist
path: dist/
- uses: actions/download-artifact@master
with:
name: node_modules
path: ./
- run: tar -xvf node_modules.tar
- run: yarn test-only
test_browser:
needs: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@master
with:
name: dist
path: dist/
- run: echo '::warning ::Not able to automate browser tests yet'
- run: '# yarn test-browser-ci'