Skip to content

Run integration tests #537

Run integration tests

Run integration tests #537

---
name: Run integration tests
on: workflow_dispatch
jobs:
build-test-scan:
name: Build image and integration test
runs-on: ubuntu-latest
env:
CPD_GOOGLEANALYTICSTAG: ${{secrets.TF_VAR_CPD_GOOGLEANALYTICSTAG}}
CPD_SPACE_ID: ${{secrets.TF_VAR_CPD_SPACE_ID}}
CPD_PREVIEW_KEY: ${{secrets.TF_VAR_CPD_PREVIEW_KEY}}
CPD_DELIVERY_KEY: ${{secrets.TF_VAR_CPD_DELIVERY_KEY}}
CPD_CLARITY: ${{secrets.TF_VAR_CPD_CLARITY}}
steps:
- uses: actions/checkout@v4
- name: Build the Docker App Image
run: cd Childrens-Social-Care-CPD; docker build . --file Dockerfile --tag childrens-social-care-cpd:latest
- name: Install Docker Compose
uses: ndeloof/[email protected]
with:
version: v2.1.0 # or latest
legacy: true # install in PATH as `docker-compose`
- name: Verify Docker Compose installation
run: docker-compose --version
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install npm version 10.9.1
run: npm install -g [email protected]
- name: Verify npm version
run: npm version
- name: Run the dev integration tests
run: cd browser-tests/dev-integration-tests; docker-compose up --exit-code-from dev-integration-tests
- uses: actions/upload-artifact@v4
name: Playwright report
if: always()
with:
name: playwright-report
retention-days: 7
path: |
${{ github.workspace }}/browser-tests/dev-integration-tests/playwright-report
- name: Run Tidy up
if: always()
run: cd browser-tests/dev-integration-tests; docker-compose down --volumes