-
Notifications
You must be signed in to change notification settings - Fork 33
NO-JIRA: fix(ci): build Playwright browser-tests image on rhoai-3.4 #2744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -633,14 +633,35 @@ jobs: | |
| # https://playwright.dev/docs/ci | ||
| # https://playwright.dev/docs/docker | ||
| # opendatahub-io/notebooks#3965: podman storage is configured to have sufficient disk space | ||
| - name: Run Playwright tests | ||
| # Build the same image as .github/workflows/build-browser-tests.yaml so codeserver | ||
| # Playwright runs use baked-in deps (pnpm + Playwright) from tests/browser/Dockerfile. | ||
| # Backport of opendatahub-io/notebooks#4096: playwright-test requires playwright-image; | ||
| # without this step PLAYWRIGHT_IMAGE is empty and `podman inspect ''` fails with | ||
| # "json: cannot unmarshal array into Go value of type define.InspectContainerData". | ||
| - name: Build browser tests image | ||
| id: browser-tests-image | ||
| if: ${{ !cancelled() && contains(inputs.target, 'codeserver') && steps.make-target.outcome == 'success' }} | ||
| run: | | ||
| set -Eeuxo pipefail | ||
| IMAGE="localhost/workbench-images-tests:ci" | ||
| PLAYWRIGHT_VERSION=$(python3 scripts/get_playwright_version.py tests/browser/package.json5) | ||
| podman build \ | ||
| --build-arg "PLAYWRIGHT_VERSION=${PLAYWRIGHT_VERSION}" \ | ||
| -t "${IMAGE}" \ | ||
| -f tests/browser/Dockerfile \ | ||
| tests/browser | ||
| echo "image=${IMAGE}" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Run Playwright tests | ||
| if: ${{ !cancelled() && contains(inputs.target, 'codeserver') && steps.make-target.outcome == 'success' && steps.browser-tests-image.outcome == 'success' }} | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good belt-and-suspenders guard: gating on |
||
| uses: ./.github/actions/playwright-test | ||
| with: | ||
| test-target: ${{ steps.calculated_vars.outputs.OUTPUT_IMAGE }} | ||
| playwright-image: ${{ steps.browser-tests-image.outputs.image }} | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Verified: |
||
| podman-socket: /var/run/podman/podman.sock | ||
| upload-report: ${{ fromJson(inputs.github).event_name == 'pull_request' }} | ||
| artifact-name: "${{ inputs.target }}_${{ steps.calculated_vars.outputs.BUILD_TYPE }}_${{ steps.calculated_vars.outputs.SANITIZED_PLATFORM }}_playwright-report" | ||
| junit-artifact-file: "${{ inputs.target }}_${{ steps.calculated_vars.outputs.BUILD_TYPE }}_${{ steps.calculated_vars.outputs.SANITIZED_PLATFORM }}_playwright-junit.xml" | ||
| grep-pattern: '@codeserver' | ||
|
|
||
| # endregion | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed: this step's build invocation (
podman build --build-arg PLAYWRIGHT_VERSION=... -t localhost/workbench-images-tests:ci -f tests/browser/Dockerfile tests/browser) matchesbuild-browser-tests.yamland the equivalent step inrhoai-3.5's template byte-for-byte.scripts/get_playwright_version.pyandtests/browser/Dockerfileboth exist on this branch.