[DCMAW-11018] Use new certificates #1097
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: backend-api pull request | |
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-22.04 | |
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 | |
# Runs unit, infra and pact tests | |
- name: Run tests | |
run: npm run test | |
- name: Generate proxy open api spec | |
run: npm run generate-proxy-open-api | |
- name: Validate SAM template | |
run: sam validate --lint | |
- name: Run SonarCloud Scan | |
uses: sonarsource/sonarqube-scan-action@bfd4e558cda28cda6b5defafb9232d191be8c203 # v4.2.1 | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
projectBaseDir: backend-api | |
- name: SonarQube Quality Gate check | |
uses: Sonarsource/sonarqube-quality-gate-action@8406f4f1edaffef38e9fb9c53eb292fc1d7684fa # master | |
# Force to fail step after specific time | |
timeout-minutes: 5 | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
with: | |
scanMetadataReportFile: backend-api/.scannerwork/report-task.txt | |