Skip to content

Merge pull request #131 from DEFRA/732 #120

Merge pull request #131 from DEFRA/732

Merge pull request #131 from DEFRA/732 #120

Workflow file for this run

name: Publish
on:
push:
branches:
- main
permissions:
id-token: write
contents: write
pull-requests: write
env:
AWS_REGION: eu-west-2
AWS_ACCOUNT_ID: '094954420758'
concurrency:
group: publish-main
jobs:
build:
if: github.run_number != 1
name: CDP-build-workflow
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Create Test Coverage Reports
run: |
npm ci
npm run build
npm test
- name: SonarCloud Scan
uses: SonarSource/sonarqube-scan-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Start docker compose
env:
NOTIFY_TEMPLATE_ID: ${{ secrets.NOTIFY_TEMPLATE_ID }}
NOTIFY_API_KEY: ${{ secrets.NOTIFY_API_KEY }}
NOTIFY_CASE_DELIVERY_EMAIL_ADDRESS: ${{ secrets.NOTIFY_CASE_DELIVERY_EMAIL_ADDRESS }}
run: |
docker compose up --wait-timeout 300 -d --quiet-pull
- name: Browserstack initial tests
run: |
npm run user-journey-test:bs
env:
BROWSERSTACK_USER: ${{ secrets.BROWSERSTACK_USER }}
BROWSERSTACK_KEY: ${{ secrets.BROWSERSTACK_KEY }}
- name: cleanup
if: always()
run: docker compose down
- name: Build and Publish
uses: DEFRA/cdp-build-action/build@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}