Skip to content

Reuse B&D artifact in test-playwright.yml#252

Draft
mishautkin wants to merge 5 commits into
mainfrom
feature/reuse-built-artifact
Draft

Reuse B&D artifact in test-playwright.yml#252
mishautkin wants to merge 5 commits into
mainfrom
feature/reuse-built-artifact

Conversation

@mishautkin

@mishautkin mishautkin commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Feature

What is the current behavior? (You can also link to an open issue here)

Steps for retreiving B&D artifacts are missing.

What is the new behavior (if this is a feature change)?

If TESTED_ARTIFACT_SLUG is provided, the workflow will download the artifact built by B&D and place it as a ready-to-install .zip in TESTED_ARTIFACT_DIR.

  • Add inputs
    • BUILD_WORKFLOW_FILENAME (build-and-distribute.yml by default)
    • TESTED_ARTIFACT_DIR (tests/qa/resources/files by default)
    • TESTED_ARTIFACT_SLUG
  • Add steps
    • Resolve tested artifact run ID (uses the triggering run ID when invoked via workflow_run, otherwise finds the latest successful B&D run on the current branch via gh run list)
    • Download tested artifact (downloads the artifact matching -* from the resolved run)
    • Rename tested artifact (strips the version suffix to normalize .zip filename to TESTED_ARTIFACT_SLUG for further usage in tests)

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

No

@mishautkin mishautkin requested a review from Biont June 1, 2026 19:31
Comment thread .github/workflows/test-playwright.yml Outdated
Comment thread .github/workflows/test-playwright.yml Outdated
default: ''
required: false
type: string
BUILD_WORKFLOW_FILENAME:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is odd in my opinion. It seems to be used as a fallback when no TESTED_ARTIFACT_SLUG is passed (because it is optional).

But the fallback hinges on the assumption that whatever other (non-build-and-distribute) build workflow also produces an artifact. And that said artifact cannot be referenced with a predictable name (convention or workflow output)

Is there even a second build workflow where these constraints apply?

Maybe I lack the full picture, but my gut feeling would be to make this "named artifact only" and reduce the complexity.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Mollie repo the WF which calls B&D is:

Name: Create release package
Filename: release.yml

Comment thread .github/workflows/test-playwright.yml Outdated

- name: Resolve tested artifact run ID
id: resolve-artifact-run-id
if: ${{ inputs.TESTED_ARTIFACT_SLUG != '' }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is supposed to run when the slug is NOT passed, right?

@mishautkin mishautkin Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opposite 🤔: supposed to run only if the slug is passed. This WF is also used for tests of websites which are deployed to static test envs - in this case there's no artifact

- Rename TESTED_ARTIFACT_SLUG to ARTIFACT_NAME following upload-artifact naming convention
- Remove TESTED_ARTIFACT_DIR, hardcode `tests/qa/resources/files` internally
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants