File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # File used by earthly
2+ PLAYWRIGHT_SNAPSHOTS_COMMIT=4cd8430
Original file line number Diff line number Diff line change 9090 run : earthly --version
9191
9292 - name : Run CI
93+ # run: earthly --verbose -P --ci --env-file-path .ci.env +all-tests
9394 run : earthly --verbose -P --ci +all-tests
94- env :
95- NEXT_PUBLIC_MUIX_PRO_KEY : ${{ secrets.muix_license }}
9695
9796 - uses : actions/upload-artifact@v3
9897 if : always()
Original file line number Diff line number Diff line change @@ -58,4 +58,5 @@ __pycache__
5858gh-pages
5959
6060# Playwright
61- playwright-artifacts /
61+ playwright-artifacts /
62+ playwright-snapshots /
Original file line number Diff line number Diff line change 1- [submodule "web-console/playwright-snapshots "]
2- path = web-console/playwright-snapshots
3- url = https://github.com/feldera/playwright-snapshots.git
Original file line number Diff line number Diff line change @@ -611,6 +611,15 @@ ui-playwright-container:
611611 COPY web-console .
612612 COPY deploy/docker-compose.yml .
613613 COPY deploy/.env .
614+
615+ # Pull playwright-snapshots for visual regression testing
616+ # It was decided it's better to clone the snapshots repo during the build rather than have it as a submodule
617+ ARG PLAYWRIGHT_SNAPSHOTS_COMMIT
618+ RUN echo PLAYWRIGHT_SNAPSHOTS_COMMIT= $PLAYWRIGHT_SNAPSHOTS_COMMIT
619+ GIT CLONE https://github.com/feldera/playwright-snapshots.git playwright-snapshots
620+ # [ -n "..." ] syntax returns true if the string is not empty, in which case the commands after `&&` execute
621+ RUN [ -n "$PLAYWRIGHT_SNAPSHOTS_COMMIT" ] && cd playwright-snapshots && git checkout $PLAYWRIGHT_SNAPSHOTS_COMMIT
622+
614623 WORKDIR web-console
615624 RUN yarn install
616625 RUN yarn playwright install
@@ -631,7 +640,6 @@ ui-playwright-container:
631640
632641ui-playwright-tests :
633642 FROM +ui-playwright-container
634-
635643 ENV FELDERA_VERSION= latest
636644
637645 TRY
@@ -640,6 +648,7 @@ ui-playwright-tests:
640648 --compose ../docker-compose.yml \
641649 --service db \
642650 --service pipeline-manager
651+ # We zip artifacts regardless of test success or error, and then we complete the command preserving test's exit_code
643652 RUN if yarn playwright test; then exit_code= 0; else exit_code= $?; fi \
644653 && cd /dbsp \
645654 && zip -r playwright-report.zip playwright-report \
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments