-
-
Notifications
You must be signed in to change notification settings - Fork 23
130 lines (107 loc) · 3.41 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# This is a basic workflow to help you get started with Actions
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
# https://stackoverflow.com/a/72408109/3443137
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-22.04
timeout-minutes: 120
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@v4
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
- 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@v4
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
- run: npm run measure:size
- run: npm run aggregate-metrics
- name: lint
run: npm run lint
test-some:
runs-on: ubuntu-22.04
timeout-minutes: 60
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@v4
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
- run: npm run build
- 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