Journey Tests #28
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: Journey Tests | |
permissions: | |
checks: write | |
pull-requests: write | |
on: | |
workflow_dispatch: | |
workflow_call: | |
jobs: | |
build: | |
name: run-tests | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: DEFRA/cdp-portal-journey-tests | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: npm | |
- name: Setup the tests | |
run: npm i | |
- name: Start docker compose | |
run: docker compose up --wait-timeout 300 -d --quiet-pull | |
- name: Run the tests | |
run: | | |
npm run test:github | |
npm run report | |
- name: debug | |
if: failure() | |
run: | | |
docker compose logs > logs.txt | |
docker ps | |
- name: Upload allure report | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: allure-report | |
path: ./allure-report | |
- name: Upload docker compose logs | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docker-compose-logs | |
path: ./logs.txt |