eGates and ePassport #221
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: Change assurance | |
on: | |
pull_request: | |
env: | |
LANG: "en_GB.UTF-8" | |
LANGUAGE: "en_GB:en" | |
LC_ALL: "en_GB.UTF-8" | |
jobs: | |
static-analysis: | |
name: Static analysis | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Scan code-base | |
uses: ./.github/actions/scan-code | |
common: | |
name: Dependencies, Unit tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [ '16', '18', '20' ] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Setup | |
uses: ./.github/actions/setup | |
with: | |
node: ${{ matrix.node }} | |
- name: Run unit tests | |
uses: ./.github/actions/test-code | |
libs: | |
name: Build libraries | |
needs: | |
- common | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Setup | |
uses: ./.github/actions/setup | |
with: | |
node: 18 | |
- name: Build libraries | |
run: npm run libs:build | |
build-app: | |
name: Build application | |
needs: | |
- common | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
app: [ 'docs' ] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Setup | |
uses: ./.github/actions/setup | |
with: | |
node: 18 | |
- name: Build | |
uses: ./.github/actions/build-app | |
with: | |
app: ${{ matrix.app }} | |
- name: Save build directory | |
uses: actions/upload-artifact@v3 | |
with: | |
name: 'build-${{ matrix.app }}' | |
path: "${{ matrix.app && format('apps/{0}/', matrix.app) }}dist" | |
if-no-files-found: error | |
retention-days: 2 | |
test-app: | |
name: Test application | |
needs: | |
- build-app | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
app: [ 'docs' ] | |
browser: [ 'chromium', 'firefox', 'electron' ] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Setup | |
uses: ./.github/actions/setup | |
with: | |
node: 18 | |
- name: Download build directory | |
uses: actions/download-artifact@v3 | |
with: | |
name: 'build-${{ matrix.app }}' | |
path: "${{ matrix.app && format('apps/{0}/', matrix.app) }}dist" | |
- name: Run functional tests | |
uses: './.github/actions/test-app' | |
with: | |
app: ${{ matrix.app }} | |
browser: ${{ matrix.browser }} | |
cypress-project-id: ${{ secrets.CYPRESS_PROJECT_ID }} | |
cypress-record-key: ${{ secrets.CYPRESS_RECORD_KEY }} | |
node: ${{ matrix.node }} |