DCAMW-9664: Add /async/credential contract tests for IPVCore consumer #191
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: 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/**" | |
- ".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 | |
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/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:unit | |
- 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 }} |