-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
ci: Fix workflow to update screenshots #4993
Conversation
The initial commit was untested, but having the workflow in the main branch allowed me to iterate on the workflow and test it in a branch. The following changes were made: - Standardize how workflow inputs are read (using inputs, which works for all triggers, instead of github.event.inputs, which only works for some triggers) - Improve the description of test_filter in selenium-lab-tests. - Add missing fields in the workflow_call trigger of selenium-lab-tests.yaml. (Unfortunately, the two triggers need to have the inputs defined separately, and with slightly different fields.) - Log the chosen ref in selenium-lab-tests, to help debug inputs. - Fix variable expansion in selenium-lab-tests so that test_filter can contain spaces. - Fix ignore_test_status, which did not work at all and broken the nightly tests last night. - Fix dependencies between jobs in update-screenshots. - Do not set status for the subordinate selenium-lab-tests job if started from update-screenshots. - Always upload screenshots from selenium-lab-tests if started from update-screenshots (normally only uploaded on failure). - Set the PR status from upload-screenshots. - Fix unpacking of screenshots from artifacts in upload-screenshots. - Fix updating of changed screenshots. - Fix handling of a lack of screenshot changes. - Split up the jobs for easier debugging in upload-screenshots. Still to do: - Fix setting of final PR status - Use a personal access token so that tests can be triggered from the PR push
Incremental code coverage: No instrumented code was changed. |
@@ -269,7 +290,7 @@ jobs: | |||
# Upload new screenshots and diffs on failure; ignore if missing | |||
- name: Upload screenshots | |||
uses: actions/upload-artifact@v3 | |||
if: ${{ failure() }} | |||
if: ${{ failure() || inputs.ignore_test_status }} |
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.
The description of ignore_test_status
says "If true, ignore test failures and treat the workflow as a success"
However, this seems to be treating the workflow as a failure. Is the description inaccurate?
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.
This means the job runs on failure, or if ignore_test_status is true. Normally, we would only upload screenshot artifacts if the tests failed. But if we're running the workflow specifically to get the screenshots updated, we upload them no matter what.
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.
Comment updated. ignore_test_status modifies many things that normally depend on test status.
@@ -197,25 +204,28 @@ jobs: | |||
# the container. | |||
- name: Test Player | |||
run: | | |||
# Use of an array keeps elements in tact, and allows an element to |
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.
"in tact" -> "intact"
Unless you're saying that using an array makes the elements remain tactful and sensitive.
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.
Done
ref: refs/pull/${{ github.event.inputs.pr }}/head | ||
ref: refs/pull/${{ inputs.pr }}/head | ||
|
||
- name: Set commit status to pending |
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.
Say, the first two steps of this workflow are the exact same as the steps of set-pending-status
.
This needs run-lab-tests
, which needs set-pending-status
.
So shouldn't set-pending-status
have already been run by the time this is run?
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.
No, those are separate jobs. Each job runs with a clean slate. You're thinking of "steps" within jobs. Calling another workflow (run-lab-tests) requires its own job. So the jobs are: 1. Set pending status, 2. run test workflow, 3. update PR, 4. set final status
The initial commit was untested, but having the workflow in the main branch allowed me to iterate on the workflow and test it in a branch. The following changes were made: - Standardize how workflow inputs are read (using inputs, which works for all triggers, instead of github.event.inputs, which only works for some triggers) - Improve the description of test_filter in selenium-lab-tests. - Add missing fields in the workflow_call trigger of selenium-lab-tests.yaml. (Unfortunately, the two triggers need to have the inputs defined separately, and with slightly different fields.) - Log the chosen ref in selenium-lab-tests, to help debug inputs. - Fix variable expansion in selenium-lab-tests so that test_filter can contain spaces. - Fix ignore_test_status, which did not work at all and broken the nightly tests last night. - Fix dependencies between jobs in update-screenshots. - Do not set status for the subordinate selenium-lab-tests job if started from update-screenshots. - Always upload screenshots from selenium-lab-tests if started from update-screenshots (normally only uploaded on failure). - Set the PR status from upload-screenshots. - Fix unpacking of screenshots from artifacts in upload-screenshots. - Fix updating of changed screenshots. - Fix handling of a lack of screenshot changes. - Split up the jobs for easier debugging in upload-screenshots. Still to do: - Fix setting of final PR status - Use a personal access token so that tests can be triggered from the PR push
The initial commit was untested, but having the workflow in the main branch allowed me to iterate on the workflow and test it in a branch. The following changes were made: - Standardize how workflow inputs are read (using inputs, which works for all triggers, instead of github.event.inputs, which only works for some triggers) - Improve the description of test_filter in selenium-lab-tests. - Add missing fields in the workflow_call trigger of selenium-lab-tests.yaml. (Unfortunately, the two triggers need to have the inputs defined separately, and with slightly different fields.) - Log the chosen ref in selenium-lab-tests, to help debug inputs. - Fix variable expansion in selenium-lab-tests so that test_filter can contain spaces. - Fix ignore_test_status, which did not work at all and broken the nightly tests last night. - Fix dependencies between jobs in update-screenshots. - Do not set status for the subordinate selenium-lab-tests job if started from update-screenshots. - Always upload screenshots from selenium-lab-tests if started from update-screenshots (normally only uploaded on failure). - Set the PR status from upload-screenshots. - Fix unpacking of screenshots from artifacts in upload-screenshots. - Fix updating of changed screenshots. - Fix handling of a lack of screenshot changes. - Split up the jobs for easier debugging in upload-screenshots. Still to do: - Fix setting of final PR status - Use a personal access token so that tests can be triggered from the PR push
The initial commit was untested, but having the workflow in the main branch allowed me to iterate on the workflow and test it in a branch. The following changes were made: - Standardize how workflow inputs are read (using inputs, which works for all triggers, instead of github.event.inputs, which only works for some triggers) - Improve the description of test_filter in selenium-lab-tests. - Add missing fields in the workflow_call trigger of selenium-lab-tests.yaml. (Unfortunately, the two triggers need to have the inputs defined separately, and with slightly different fields.) - Log the chosen ref in selenium-lab-tests, to help debug inputs. - Fix variable expansion in selenium-lab-tests so that test_filter can contain spaces. - Fix ignore_test_status, which did not work at all and broken the nightly tests last night. - Fix dependencies between jobs in update-screenshots. - Do not set status for the subordinate selenium-lab-tests job if started from update-screenshots. - Always upload screenshots from selenium-lab-tests if started from update-screenshots (normally only uploaded on failure). - Set the PR status from upload-screenshots. - Fix unpacking of screenshots from artifacts in upload-screenshots. - Fix updating of changed screenshots. - Fix handling of a lack of screenshot changes. - Split up the jobs for easier debugging in upload-screenshots. Still to do: - Fix setting of final PR status - Use a personal access token so that tests can be triggered from the PR push
The initial commit was untested, but having the workflow in the main branch allowed me to iterate on the workflow and test it in a branch. The following changes were made: - Standardize how workflow inputs are read (using inputs, which works for all triggers, instead of github.event.inputs, which only works for some triggers) - Improve the description of test_filter in selenium-lab-tests. - Add missing fields in the workflow_call trigger of selenium-lab-tests.yaml. (Unfortunately, the two triggers need to have the inputs defined separately, and with slightly different fields.) - Log the chosen ref in selenium-lab-tests, to help debug inputs. - Fix variable expansion in selenium-lab-tests so that test_filter can contain spaces. - Fix ignore_test_status, which did not work at all and broken the nightly tests last night. - Fix dependencies between jobs in update-screenshots. - Do not set status for the subordinate selenium-lab-tests job if started from update-screenshots. - Always upload screenshots from selenium-lab-tests if started from update-screenshots (normally only uploaded on failure). - Set the PR status from upload-screenshots. - Fix unpacking of screenshots from artifacts in upload-screenshots. - Fix updating of changed screenshots. - Fix handling of a lack of screenshot changes. - Split up the jobs for easier debugging in upload-screenshots. Still to do: - Fix setting of final PR status - Use a personal access token so that tests can be triggered from the PR push
The initial commit was untested, but having the workflow in the main branch allowed me to iterate on the workflow and test it in a branch.
The following changes were made:
Still to do: