Skip to content

[NRL-1922] Fix pr-checks workflow issues #2

[NRL-1922] Fix pr-checks workflow issues

[NRL-1922] Fix pr-checks workflow issues #2

Workflow file for this run

name: Run PR checks

Check failure on line 1 in .github/workflows/pr-checks.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/pr-checks.yml

Invalid workflow file

(Line: 40, Col: 9): Unexpected value 'path', (Line: 55, Col: 9): Unexpected value 'path'
run-name: "Running checks for PR #${{ github.event.pull_request.number }} (${{ github.event.pull_request.title }})"
on:
pull_request:
types: [opened, reopened, synchronize]
permissions:
id-token: write
contents: read
actions: write
pull-requests: write
jobs:
build:
name: Build and test
runs-on: codebuild-nhsd-nrlf-ci-build-project-${{ github.run_id }}-${{ github.run_attempt }}
steps:
- name: Git clone - ${{ github.ref }}
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Setup environment
run: |
echo "${HOME}/.asdf/bin" >> $GITHUB_PATH
poetry install --no-root
- name: Build
run: make build
- name: Test
run: make test
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: dist
sonar:
name: SonarQube analysis and quality gate check
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Get build artifacts
uses: actions/download-artifact@v3
with:
name: build-artifacts
path: dist
# Triggering SonarQube analysis as results of it are required by Quality Gate check.
- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# Check the Quality Gate status.
- name: SonarQube Quality Gate check
id: sonarqube-quality-gate-check
uses: sonarsource/sonarqube-quality-gate-action@master
with:
pollingTimeoutSec: 600
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}