-
Notifications
You must be signed in to change notification settings - Fork 425
62 lines (52 loc) · 1.38 KB
/
main.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
name: CI Build
on:
# Trigger the workflow on push or pull request,
# but only for the master branch on Push and any branches on PR
push:
branches:
- master
- next
pull_request:
branches:
- '**'
env:
CI: true
jobs:
run:
name: Node ${{ matrix.node }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# define which version of NodeJS to run the build
node: [18]
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
fetch-depth: 3
- uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Set Node.js version
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: node --version
- run: npm --version
- name: Install npm dependencies
run: npm install
- name: Prod Build with TS Types
run: npm run build:prod
- name: Start HTTP Server
run: npm run serve:demo &
- name: Run Cypress E2E tests
uses: cypress-io/github-action@v6
with:
# wait-on: 'http://localhost:8080'
browser: chrome
config-file: cypress/cypress.config.ts
install-command: npm install