-
Notifications
You must be signed in to change notification settings - Fork 106
95 lines (73 loc) · 2.21 KB
/
CI.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
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
---
# Documentation:https://help.github.com/en/articles/workflow-syntax-for-github-actions
name: Continuous Integration
on:
pull_request:
jobs:
type-check:
name: Verify TypeScript types
runs-on: ubuntu-latest
steps:
- name: Checkout the code base
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install dependencies
run: |
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
npm ci
npx lerna bootstrap
rm -rf .npmrc
- name: Run Typescript
run: npm run check
smoke-test:
name: Run Smoke Test (build)
runs-on: ubuntu-latest
steps:
- name: Checkout the code base
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install dependencies
run: |
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
npm ci
npx lerna bootstrap
rm -rf .npmrc
- name: Build for Production
run: npm run build
source-test:
name: Run Tests on Source Code
runs-on: ubuntu-latest
steps:
- name: Checkout the code base
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: '16'
# - name: Install Cypress dependencies
# run: sudo apt update && sudo apt install -y libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb
- name: Install dependencies
run: |
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
npm ci
npx lerna bootstrap
rm -rf .npmrc
- name: Run Unit Tests
run: npm run test
# - name: Cypress run
# uses: cypress-io/github-action@v4
# with:
# build: npm run build:root
# start: npm run serve