Skip to content

chore: setup-node caching #23

chore: setup-node caching

chore: setup-node caching #23

Workflow file for this run

name: Tests
on:
pull_request:
push:
branches:
- main
paths-ignore:
- ".github/**"
- "**.md"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
name: Tests
runs-on: ubuntu-22.04
strategy:
matrix:
name: [backend, frontend-merge, frontend-pr]
include:
- name: backend
dir: backend
token: SONAR_TOKEN_BACKEND
triggers: ('backend/')
triggers_event: ('pull_request')
- name: frontend-merge
dir: frontend
triggers: ('.')
triggers_event: ('pull_request')
- name: frontend-pr
dir: frontend
token: SONAR_TOKEN_FRONTEND
triggers_event: ('push')
steps:
- uses: actions/checkout@v4
- uses: ./
with:
commands: |
npm ci
npm run test:cov
dir: ${{ matrix.dir }}
node_version: "20"
repository: bcgov/quickstart-openshift
sonar_args: >
-Dsonar.exclusions=**/coverage/**,**/node_modules/**,**/*spec.ts
-Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info
-Dsonar.organization=bcgov-nr
-Dsonar.projectKey=bcgov-nr_action-test-and-analyse_${{ matrix.dir }}
-Dsonar.sources=src
-Dsonar.tests.inclusions=**/*spec.ts
sonar_token: ${{ secrets[matrix.token] }}
triggers: ${{ matrix.triggers }}
triggers_event: ${{ matrix.triggers_event }}