-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (50 loc) · 1.28 KB
/
buildAndTest.yaml
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
name: Build And Test
on:
push:
branches:
- 'master'
- 'feat/rewrite'
pull_request:
branches:
- 'master'
- 'feat/rewrite'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ 18, 20, 22 ]
name: Build on Node ${{ matrix.node }}
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: yarn
- run: yarn install --immutable
- run: yarn run build
test:
runs-on: ubuntu-latest
name: Test
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
cache: yarn
- name: Cypress run
uses: cypress-io/github-action@v6
with:
working-directory: ./vue-json-form
build: yarn run build
start: yarn dev
wait-on: 'http://localhost:5173'
record: true
env:
# pass GitHub token to allow accurately detecting a build vs a re-run build
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Cypress
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}