forked from hasadna/open-bus-map-search
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (30 loc) · 803 Bytes
/
Copy pathsonarcloud.yml
File metadata and controls
37 lines (30 loc) · 803 Bytes
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
name: SonarCloud Analysis
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
sonarcloud:
name: SonarCloud Scan
runs-on: ubuntu-latest
if: github.event.pull_request.head.repo.fork == false
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install dependencies
run: npm install
- name: Run unit tests with coverage
run: npx jest --coverage --coverageReporters=lcov
- name: SonarCloud Scan
uses: SonarSource/sonarqube-scan-action@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}