-
Notifications
You must be signed in to change notification settings - Fork 3
39 lines (38 loc) · 1.19 KB
/
sonarcloud.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
name: Build
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
- uses: browser-actions/setup-chrome@v1
- name: Cache firebase emulators
uses: actions/cache@v4
with:
path: ~/.cache/firebase/emulators
key: ${{ runner.os }}-firebase-emulators-${{ github.sha }}
restore-keys: |
${{ runner.os }}-firebase-emulators-
- name: Install dependencies
run: npm i && npm i -g firebase-tools
- name: Test and coverage
run: firebase emulators:exec --project fukagawa-coffee "npx ng test --no-watch --code-coverage"
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_FUKAGAWA_COFFEE }}
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}