Skip to content

Bump cypress from 13.17.0 to 14.0.0 (#11) #46

Bump cypress from 13.17.0 to 14.0.0 (#11)

Bump cypress from 13.17.0 to 14.0.0 (#11) #46

Workflow file for this run

name: Pipeline
on:
push:
workflow_dispatch:
inputs:
additional_docker_tag:
description: Additional docker tag that can be used to specify stable or testing tags
required: false
default: ''
type: string
permissions:
contents: read
packages: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
build:
uses: ministryofjustice/hmpps-github-actions/.github/workflows/node_build.yml@v2
unit_tests:
uses: ministryofjustice/hmpps-github-actions/.github/workflows/node_unit_tests.yml@v2
needs: build
integration_tests:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/download-artifact@v4
with:
name: npm_build_artifacts
- uses: actions/cache/restore@v4
with:
path: |
./node_modules
~/.cache/Cypress
key: ${{ runner.os }}-build-node-modules-${{ hashFiles('**/package-lock.json') }}
- uses: actions/download-artifact@v4
with:
name: npm_build_artifacts
path: |
build/
dist/
assets/stylesheets/
- name: Start service
run: |
cp .env.example .env
npm run wiremock &
npm run dev-server &
timeout 10 sh -c 'until curl -s localhost:3000; do sleep 1; done'
- name: Run tests
run: npm run int-test
- if: always()
uses: actions/upload-artifact@v4
with:
name: npm_integration_test_artifacts
path: |
integration-tests/videos/
integration_tests/screenshots/
helm_lint:
strategy:
matrix:
environment: [dev, preprod, prod]
uses: ministryofjustice/hmpps-github-actions/.github/workflows/test_helm_lint.yml@v2
secrets:
HMPPS_SRE_SLACK_BOT_TOKEN: ${{ secrets.HMPPS_SRE_SLACK_BOT_TOKEN }}
with:
environment: ${{ matrix.environment }}
docker_build:
if: github.ref_name == 'main' || github.event_name == 'workflow_dispatch'
uses: ministryofjustice/hmpps-github-actions/.github/workflows/docker_build.yml@v2
with:
docker_registry: 'ghcr.io'
registry_org: 'ministryofjustice'
additional_docker_tag: ${{ inputs.additional_docker_tag }}
push: true
docker_multiplatform: true
deploy_dev:
name: Deploy to dev
needs:
- docker_build
- integration_tests
- unit_tests
uses: ministryofjustice/hmpps-github-actions/.github/workflows/deploy_env.yml@v2
secrets: inherit
with:
environment: dev
app_version: ${{ needs.docker_build.outputs.app_version }}
deploy_preprod:
name: Deploy to preprod
needs:
- docker_build
- integration_tests
- unit_tests
uses: ministryofjustice/hmpps-github-actions/.github/workflows/deploy_env.yml@v2
secrets: inherit
with:
environment: preprod
app_version: ${{ needs.docker_build.outputs.app_version }}
deploy_prod:
name: Deploy to prod
needs:
- docker_build
- deploy_dev
- deploy_preprod
uses: ministryofjustice/hmpps-github-actions/.github/workflows/deploy_env.yml@v2
secrets: inherit
with:
environment: prod
app_version: ${{ needs.docker_build.outputs.app_version }}