-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (63 loc) · 2.01 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
name: Run unit and integration tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
unit-and-integration-tests:
name: Unit and integration tests
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Install src dependencies and build
run: |
cd extension/src
npm install
npm run build -if-present
- name: Install test dependencies and build
run: |
cd extension/tests
npm install
npm run build -if-present
- name: Create serviceAccountKey.json
env:
SERVICE_ACCOUNT_KEY: ${{ secrets.SERVICE_ACCOUNT_KEY }}
run: echo $SERVICE_ACCOUNT_KEY | base64 -di > ./extension/tests/configs/serviceAccountKey.json
- name: Run unit tests
env:
BUCKET_NAME: ${{ secrets.BUCKET_NAME }}
CRON_SCHEDULE: ${{ secrets.CRON_SCHEDULE }}
PROJECT_ID: ${{ secrets.PROJECT_ID }}
run: |
cd extension/tests
npm run test:unit
- name: Run integration tests
env:
BUCKET_NAME: ${{ secrets.BUCKET_NAME }}
CRON_SCHEDULE: ${{ secrets.CRON_SCHEDULE }}
PROJECT_ID: ${{ secrets.PROJECT_ID }}
run: |
cd extension/tests
npm run test:integration
# - name: Install Firebase CLI
# run: |
# curl -sL https://firebase.tools | bash
# - name: Start Firebase Emulator and run system tests
# env:
# BUCKET_NAME: ${{ secrets.BUCKET_NAME }}
# CRON_SCHEDULE: ${{ secrets.CRON_SCHEDULE }}
# PROJECT_ID: ${{ secrets.PROJECT_ID }}
# FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
# run: |
# cd extension/tests/system-tests
# firebase emulators:exec --project $PROJECT_ID "npm run test:system"