feat(EUDPA-177): add E2E pipeline #3
Workflow file for this run
This file contains hidden or 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: E2E Tests | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| workflow_dispatch: | |
| jobs: | |
| e2e: | |
| if: github.event_name == 'workflow_dispatch' || !github.event.pull_request.draft | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Start stack | |
| run: ./scripts/stack/run-stack.sh | |
| - name: Run E2E tests | |
| run: | | |
| docker run --rm \ | |
| --network host \ | |
| --user root \ | |
| -v ${{ github.workspace }}/artifacts/test-results:/app/test-results \ | |
| -v ${{ github.workspace }}/artifacts/playwright-report:/app/playwright-report \ | |
| -v ${{ github.workspace }}/artifacts/allure-results:/app/allure-results \ | |
| --entrypoint npx \ | |
| defradigital/trade-imports-animals-tests:latest \ | |
| playwright test \ | |
| --config=playwright.local.fast.config.ts \ | |
| --grep-invert "@agent|@a11y" | |
| - name: Upload playwright report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report | |
| path: artifacts/playwright-report/ | |
| retention-days: 14 | |
| - name: Upload allure results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: allure-results | |
| path: artifacts/allure-results/ | |
| retention-days: 14 | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results | |
| path: artifacts/test-results/ | |
| retention-days: 14 | |
| - name: Tear down stack | |
| if: always() | |
| run: docker compose -p trade-imports-animals down |