Skip to content

Update NotGovUK to v0.15.2 #311

Update NotGovUK to v0.15.2

Update NotGovUK to v0.15.2 #311

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@v4
- name: Scan code-base
uses: ./.github/actions/scan-code
common:
name: Dependencies, Unit tests
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '18', '20', '22' ]
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
with:
node: ${{ matrix.node }}
- name: Run unit tests
uses: ./.github/actions/test-code
with:
node: ${{ matrix.node }}
libs:
name: Build libraries
needs:
- common
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
with:
node: 22
- name: Build libraries
run: npm run libs:build
build-app:
name: Build application
needs:
- common
runs-on: ubuntu-latest
strategy:
matrix:
app: [ 'docs', 'next-example', 'remix-example' ]
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
with:
node: 22
- name: Build
uses: ./.github/actions/build-app
with:
app: ${{ matrix.app }}
- name: Save build directory
uses: actions/upload-artifact@v4
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', 'next-example', 'remix-example' ]
browser: [ 'chromium', 'firefox', 'electron' ]
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
with:
node: 22
- name: Download build directory
uses: actions/download-artifact@v4
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: 22