Skip to content

add sonar cloud actions #4

add sonar cloud actions

add sonar cloud actions #4

Workflow file for this run

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: 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 }}