-
Notifications
You must be signed in to change notification settings - Fork 7
45 lines (42 loc) · 1.23 KB
/
nodejs.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
name: Node.js CI
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
CI: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Disable shallow clones for better analysis
- uses: actions/setup-node@v2
with:
node-version: 14
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm t
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@de2e56b42aa84d0b1c5b622644ac17e505c9a049
with:
args: >
-Dsonar.organization=joebowbeer
-Dsonar.projectKey=joebowbeer_regsync
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info
-Dsonar.sources=src
-Dsonar.exclusions=src/**/*.test.*
-Dsonar.tests=src
-Dsonar.test.inclusions=src/**/*.test.*
-Dsonar.verbose=false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- if: github.event_name == 'push'
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}