-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (33 loc) · 1.24 KB
/
ci.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: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install nodejs
uses: actions/setup-node@v1
with:
node-version: "18.x"
- name: Install node dependencies
run: npm ci
- name: Run linting
run: npm run lint
- name: Run unit tests
run: |
npm run unit-test
- name: Analyse code quality
uses: sonarsource/sonarqube-scan-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.organization=defra
-Dsonar.projectKey=DEFRA_flood-data
-Dsonar.exclusions=**/node_modules/**,**/test/**,**/test-output/**,**/queries.js
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info
-Dsonar.javascript.exclusions=**/node_modules/**,**/test/**,**/test-output/**,**/queries.js