test(e2e): homepage screenshot tests #39
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: E2E Tests | |
on: | |
pull_request: | |
paths: | |
- 'e2e/**' | |
workflow_dispatch: | |
jobs: | |
docker-build-e2e: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Delete unnecessary tools folder to prevent "out of space" error | |
run: rm -rf /opt/hostedtoolcache | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build E2E Docker Image | |
uses: ./.github/actions/docker-build-e2e | |
with: | |
name: oisy-e2e-image | |
e2e: | |
runs-on: ubuntu-latest | |
needs: docker-build-e2e | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download E2E Docker image artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: oisy-e2e-image | |
path: . | |
- name: Load Docker image | |
run: | | |
gzip -d oisy-e2e-image.tar.gz | |
docker load -i oisy-e2e-image.tar | |
- name: Run E2E Docker container | |
run: | | |
docker run -d -p 4943:4943 --name oisy-e2e-container oisy-e2e-image:latest | |
- name: Prepare | |
uses: ./.github/actions/prepare | |
- name: Test | |
run: npm run e2e:ci | |
- uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 | |
- name: Cleanup Docker container | |
run: | | |
docker stop oisy-e2e-container | |
docker rm oisy-e2e-container | |
may-merge: | |
needs: ['e2e'] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cleared for merging | |
run: echo OK |