You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a project that uses the nrwl/ci/.github/workflows/nx-cloud-main.yml@refs/tags/v0.14 action and some agents to run my Playwright tests for my project.
In my previous setup, I used playwright's sharding feature, where you gather the blob reports from each shard job as artifacts and then consolidate then in a subsequent job.
With using the nx-cloud-main workflow mentioned above, I set the input values for collecting some artifacts. But unfortunately the Upload Artifacts step only runs if the main job was successful. See
This will allow for artifacts for failed tests to be uploaded too, which is pretty essential.
Is there a recommended approach here, or is this a change that needs to be made to the nx-cloud-main workflow?
Potential solutions:
Provide some guidance to your users that they should include || true to the end of the command where failures are acceptable
This will unfortunately give a false signal of success for the main job
Add the always() expression to the condition in the "Upload Artifacts" step
This may be an unexpected behaviour for some users
Add an input artifacts-always-upload to the workflow that allows a user to conditionally turn this behaviour on.
The condition in the step would become: if: ${{ inputs.artifacts-path != '' && (success() || (failure() && inputs.artifacts-always-upload)) }}
Extract the steps of this workflow as a github action (which would exclude the artifact bit) so that users can leverage this code within their own job and handle artifacts how they wish. The nx-could-main workflow in your repository would then also use this extracted action.
What do you think?
The text was updated successfully, but these errors were encountered:
Hello @markwhitfeld ! Thanks for creating this feature request! Do you think you can create a PR with your suggested implementation? If not, maybe I can try to put together something at some point, but it will not be very soon!
I think option (3) Add an input artifacts-always-upload to the workflow sounds like the best one, since it seems like the less disruptive of existing functionality.
I have a project that uses the
nrwl/ci/.github/workflows/nx-cloud-main.yml@refs/tags/v0.14
action and some agents to run my Playwright tests for my project.In my previous setup, I used playwright's sharding feature, where you gather the blob reports from each shard job as artifacts and then consolidate then in a subsequent job.
With using the
nx-cloud-main
workflow mentioned above, I set the input values for collecting some artifacts. But unfortunately theUpload Artifacts
step only runs if the main job was successful. Seeci/.github/workflows/nx-cloud-main.yml
Lines 368 to 374 in 81f1194
The Playwright sharding docs recommend to use
if: always()
in the "Upload Artifact" step:This will allow for artifacts for failed tests to be uploaded too, which is pretty essential.
Is there a recommended approach here, or is this a change that needs to be made to the
nx-cloud-main
workflow?Potential solutions:
|| true
to the end of the command where failures are acceptablealways()
expression to the condition in the "Upload Artifacts" stepartifacts-always-upload
to the workflow that allows a user to conditionally turn this behaviour on.if: ${{ inputs.artifacts-path != '' && (success() || (failure() && inputs.artifacts-always-upload)) }}
nx-could-main
workflow in your repository would then also use this extracted action.What do you think?
The text was updated successfully, but these errors were encountered: