Merge pull request #35 from WildCodeSchool/feat-add_seed #15
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_test | |
on: | |
push: | |
branches: [ main, dev ] | |
jobs: | |
e2e_test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v4 | |
# Print the current directory | |
- name: Debugs logs | |
run: pwd | |
# List curent directory | |
- name: Debugs logs 2 | |
run: ls -l | |
- name: install playwright | |
run: npm init playwright@latest | |
- name: Run interface test | |
run: docker compose -f docker-compose.e2e.yml up --build --exit-code-from e2e | |
# If test fails, check the screenshot folder | |
- name: Debugs logs 3 | |
if: failure() | |
run: ls -l ./e2e/screenshots | |
# Upload screenshot in case of failure | |
- name: Upload screenshot | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: e2e-snapshots | |
path: ./e2e/screenshots | |
- name: Stop and remove Docker containers (cleanup) | |
if: always() | |
run: docker compose -f docker-compose.e2e.yml down | |