refactor: add Status List Mock to Mocks repo #37
This file contains hidden or 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: Status List Mock - Pull Request Checks | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - reopened | |
| - ready_for_review | |
| - synchronize | |
| paths: | |
| - status-list-mock/** | |
| - .github/workflows/status-list-mock-pull-request-checks.yml | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| check-sam-template-formatting: | |
| name: Check SAM template formatting | |
| uses: ./.github/workflows/check-sam-template-formatting.yml | |
| with: | |
| working-directory: ./status-list-mock | |
| validate-and-build-sam-template: | |
| name: Validate and build SAM template | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 15 | |
| defaults: | |
| run: | |
| working-directory: ./status-list-mock | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version-file: status-list-mock/.nvmrc | |
| cache: npm | |
| cache-dependency-path: status-list-mock/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Check code formatting | |
| run: npm run format:check | |
| - name: Run the linter | |
| run: npm run lint | |
| - name: Run unit tests | |
| run: npm run test | |
| - name: Set up SAM CLI | |
| uses: aws-actions/setup-sam@89ddb14d60e682855e3fea4be85b3c56485de310 # v3 | |
| with: | |
| version: 1.132.0 | |
| use-installer: true | |
| - name: Validate SAM template | |
| run: | | |
| echo "SAM_CLI_TELEMETRY=0" >> $GITHUB_ENV | |
| sam validate --lint | |
| - name: Build SAM template | |
| run: sam build --parallel | |
| - name: SonarQube Scan | |
| if: ${{ github.actor != 'dependabot[bot]' }} | |
| uses: sonarsource/sonarqube-scan-action@59db25f34e16620e48ab4bb9e4a5dce155cb5432 # v8.0.0 | |
| with: | |
| projectBaseDir: ./status-list-mock | |
| env: | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Check SonarQube quality gate | |
| if: ${{ github.actor != 'dependabot[bot]' }} | |
| uses: SonarSource/sonarqube-quality-gate-action@cf038b0e0cdecfa9e56c198bbb7d21d751d62c3b # v1.2.0 | |
| timeout-minutes: 5 | |
| env: | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| with: | |
| scanMetadataReportFile: status-list-mock/.scannerwork/report-task.txt | |
| run-checkov: | |
| name: Run Checkov | |
| uses: ./.github/workflows/run-checkov.yml | |
| with: | |
| file-to-scan: status-list-mock/template.yaml | |
| check-oas-for-drift: | |
| name: Check Status List OAS for drift | |
| uses: ./.github/workflows/status-list-mock-check-oas-for-drift.yml | |
| if: github.event.pull_request.user.login != 'dependabot[bot]' | |
| secrets: | |
| WALLET_CRS_DEPLOY_KEY: ${{ secrets.WALLET_CRS_DEPLOY_KEY }} | |
| GH_WORKFLOW_FAILURE_BOT_SLACK_WEBHOOK_URL: ${{ secrets.GH_WORKFLOW_FAILURE_BOT_SLACK_WEBHOOK_URL }} |