Run integration tests #540
Workflow file for this run
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: 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: latest # 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@v4 | |
with: | |
node-version: 'latest' | |
- name: Install latest NPM version | |
run: npm install -g npm@latest | |
- 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 || true | |
- 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 |