Skip to content

DCMAW-9802: Error when failing to write session created event #72

DCMAW-9802: Error when failing to write session created event

DCMAW-9802: Error when failing to write session created event #72

name: Async-credential Pull Request CI
on:
# Triggers the workflow on pull request events for all branches
pull_request:
branches:
- main
types:
- opened
- reopened
- ready_for_review
- synchronize
paths:
- "backend-api/src/**"
- ".github/workflows/backend-api-pull-request.yml"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
ci-checks:
name: Run CI checks
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: backend-api/src
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Setup nodeJS v20
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: backend-api/src/package-lock.json
- name: Install dependencies
run: npm install
- name: Linting
run: npm run lint
- name: Check formatting using Prettier
run: npm run format:check
- name: Run tests #This should be updated to only run unit/infra tests when they have been categorised as such
run: npm run test
- name: "Run SonarCloud Scan"
uses: SonarSource/sonarcloud-github-action@e44258b109568baa0df60ed515909fc6c72cba92 # master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: SonarQube Quality Gate check
uses: Sonarsource/sonarqube-quality-gate-action@72f24ebf1f81eda168a979ce14b8203273b7c3ad # master
# Force to fail step after specific time
timeout-minutes: 5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}