Switch away from deprecated github action to recommended action #808
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |