-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (40 loc) · 1.07 KB
/
pull_request.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
name: test
on:
pull_request:
branches:
- main
- dev
- hotfix/**
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.X]
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: install npm
run: npm ci
- name: install firebase-tools
run: npm i -g firebase-tools
- name: run firebase emulator
run: npm run emulators:test & sleep 10
- name: test
run: npm test
- name: wait for emulator report
run: sleep 10
- name: coverage request
id: coverageRequest
uses: SonicGarden/firestore-rules-report-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
report-url: "http://localhost:8080/emulator/v1/projects/oichan-testable-firebase:ruleCoverage"