Skip to content

Commit

Permalink
feat: Remove Gitlab trigger and upload logs for debug upon tests faii…
Browse files Browse the repository at this point in the history
…lure
  • Loading branch information
toninis committed Apr 22, 2024
1 parent 68c9a93 commit 4694df2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,16 @@ jobs:
docker build --quiet -t mm-playwright -f Playwright.Dockerfile .
- name: e2e/test
id: test
run: |
mkdir -p ${{ github.workspace }}/results
${{ github.workspace }}/e2e/scripts/run.sh
## Check if we have an early failures in order to upload logs
NUM_FAILURES=0
NUM_FAILURES=$((NUM_FAILURES + $(jq '.suites[].suites[].specs[].tests[] | last(.results[]) | select(.status != "passed").status' < ${{ github.workspace }}/results/pw-results-${{ matrix.run_id }}.json | wc -l)))
echo "FAILURES=${NUM_FAILURES}" >> ${GITHUB_OUTPUT}
- name: e2e/persist-report-results
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
with:
Expand All @@ -174,6 +180,15 @@ jobs:
compression-level: 0
retention-days: 1

- name: e2e/persist-report-logs
if: ${{ fromJson(steps.test.outputs.FAILURES) > 0 }}
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
with:
name: e2e-playwright-logs-${{ matrix.run_id }}
path: ${{ github.workspace }}/logs
compression-level: 0
retention-days: 5

generate-report:
runs-on: ubuntu-22.04
needs:
Expand Down
4 changes: 0 additions & 4 deletions .gitlab-ci.yml

This file was deleted.

0 comments on commit 4694df2

Please sign in to comment.