Skip to content

Switch away from deprecated github action to recommended action #808

Switch away from deprecated github action to recommended action

Switch away from deprecated github action to recommended action #808

Workflow file for this run

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