Skip to content

Commit

Permalink
Fix integration tests GitHub Workflow (#569)
Browse files Browse the repository at this point in the history
* Bump checkout and upload-artifact v3 to 4.

* Verify Docker Compose installation

* Install Docker Compose

* Node and NPM

* -

* -

* -

* -

* Env vars

* Updates

* True

* Revert

* -

* -

---------

Co-authored-by: Matt Barton <[email protected]>
  • Loading branch information
as2024ad and mattb-hippo authored Dec 2, 2024
1 parent 3e71214 commit 3c57de6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/docker-dev-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,35 @@ jobs:
CPD_DELIVERY_KEY: ${{secrets.TF_VAR_CPD_DELIVERY_KEY}}
CPD_CLARITY: ${{secrets.TF_VAR_CPD_CLARITY}}
steps:
- uses: actions/checkout@v3
- 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
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

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
name: Playwright report
if: always()
with:
Expand Down
8 changes: 4 additions & 4 deletions browser-tests/dev-integration-tests/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ services:
children-social-care-cpd:
image: childrens-social-care-cpd:latest
environment:
- CPD_AZURE_ENVIRONMENT=dev-integration
- CPD_AZURE_ENVIRONMENT=dev
- CPD_CLARITY=${CPD_CLARITY}
- CPD_CONTENTFUL_ENVIRONMENT=dev-integration
- CPD_CONTENTFUL_ENVIRONMENT=dev
- CPD_DELIVERY_KEY=${CPD_DELIVERY_KEY}
- CPD_GOOGLEANALYTICSTAG=${CPD_GOOGLEANALYTICSTAG}
- CPD_PREVIEW_KEY=${CPD_PREVIEW_KEY}
Expand All @@ -22,6 +22,6 @@ services:
- PLAYWRIGHT_BASE_URL=http://children-social-care-cpd
- CI=1
volumes:
- ./playwright-report:/app/playwright-report/
- ${PWD}/playwright-report:/app/playwright-report
command: npx playwright test
working_dir: /app
working_dir: /app

0 comments on commit 3c57de6

Please sign in to comment.