-
-
Notifications
You must be signed in to change notification settings - Fork 24
97 lines (79 loc) · 2.48 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
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
# This is a basic workflow to help you get started with Actions
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version-file: '.nvmrc'
- name: Reuse npm cache folder
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: |
~/.npm
./node_modules
# invalidate cache when any package-lock.json changes
key: ${{ runner.os }}-npm-test-x2-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-npm-test-x2-
- name: install npm dependencies
run: |
rm -f node_modules/__ngcc_entry_points__.json
npm install --legacy-peer-deps --force
- name: build
run: npm run build
- name: test:aws
uses: GabrielBB/xvfb-action@v1
with:
run: npm run test:aws
# https://firebase.google.com/docs/emulator-suite/install_and_configure#integrate_with_your_ci_system
- name: Reuse firebase emulators cache folder
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: |
~/.cache/firebase/emulators/
# invalidate cache when config changes
key: ${{ runner.os }}-npm-firebase-x1-${{ hashFiles('**/firebase.json') }}
restore-keys: |
${{ runner.os }}-npm-firebase-x1-
- name: setup firebase emulator
run: npm run server:firebase:setup
- name: test:firebase
uses: GabrielBB/xvfb-action@v1
with:
run: npm run test:firebase
- name: test:pouchdb
uses: GabrielBB/xvfb-action@v1
with:
run: npm run test:pouchdb
- name: test:rxdb-lokijs
uses: GabrielBB/xvfb-action@v1
with:
run: npm run test:rxdb-lokijs
- name: test:rxdb-dexie
uses: GabrielBB/xvfb-action@v1
with:
run: npm run test:rxdb-dexie
- name: test:watermelondb
uses: GabrielBB/xvfb-action@v1
with:
run: npm run test:watermelondb
- name: measure build size
run: npm run measure:size
- name: aggregate metrics
run: npm run aggregate-metrics
- name: lint
run: npm run lint