* Add `maxFailures`
* Intentionally fail a test for testing the failure limit
* Add changelog
* Add step to get total number of E2E tests
* Increase max failures
* Add warnings to the test summary.
Also moved some stuff around.
* Update changelog
* Use env var to set `maxFailures` value instead of hard-coding it
* Make sure env var is converted to a number
* Allow maxFailures even if not on CI
* Show incomplete e2e run warning only when E2E_MAX_FAILURES is set
* Safely escape new lines in comment body
* Fix returned stringified summary
* Remove unnecessary newline escaping
* Fix incorrect reference to E2E_MAX_FAILURES
* Minor formatting change
* Shorten warning messages
* Minor change in warning message
* Intentionally fail only 1 test
* Remove intentional failures
* Removed duplicate env declaration
* Correct pnpm command and playwright config file location
* Simplify reference to CI variable
* Remove unnecessary if condition
* Remove references to the old E2E_PLAYWRIGHT flag
* Remove references to the old E2E_PPTR_SUMMARY_PATH variable
* Test for 2 warnings
* Revert to correct locator
* Test for only 1 warning
* Pass all tests
* Split changelog script from code-freeze
* Remove hardcoded repository info from testing
* Remove generation of changelog.txt file from automation
* Correct comments and add back write of readme
* Simplify if expression
* Call the new workflow in Woo Test Reports repo for publishing PR test reports
* Rename Playwright-related steps
* Archive Puppeteer screenshots only when Playwright flag is off
* Correct step name and if condition in Puppeteer steps
* Run only a single Playwright test for testing
* Correct workflow name
* Add commit message as input
* Remove invalid COMMIT_MESSAGE input
* Add root_dir input
* Update s3 root dir input
* Update link to full E2E test report
* Re-enable all Playwright tests
* Temporarily toggle Playwright feature flag on
* Add job for test summary
* Add dummy run command
* Debug object contents
* Test getting json from prev step output
* Try toJSON()
* Test access to keys
* Try using context
* Use separate file
* Debug steps
* Try dummy job summary
* Minor job rename
* Add script for preparing job summary
* Fix context syntax error
* Correct artifact path
* List contents of artifacts folder
* inspect API summary contents
* inspect apisummary
* Remove dummy step for listing artifacts folder contents
* Parse number to string
* Correct SHA
* Try printing job summary on next step
* Create PR comment
* Minor step rename to test PR comment update
* Add another line break
* Test for puppeteer tests
* Test full Playwright test run
* Test full Puppeteer e2e run
* Fix spacing inconsistency
* Specify other test result categories in PPTR run
* Rename script file
* Minor refactor and documentation on script file
* Minor addition to script documentation
The original event used, 'pull_request', runs in the context of the
pull request. In the case of pull requests created from forks this means
that a read-only GitHub token is used for API calls, and thus the
call used to assign the milestone fails.
The fix is using the 'pull_request_target' event, which runs in the
context of the base branch, and thus with a read-write token. See:
https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_target
Also, added a warning message when no milestone without a release
branch is found and thus the newest existing milestone is assigned
(this is a fallback that should normally not happen).
If the GH API call to assign the milestone to a merged PR returns an
error, the data returned from the call will be dumped to the console,
and thus will be readable by looking at the action execution log.
The milestone is chosen as follows:
1. List all the open milestones with a title of "X.Y.Z"
2. Sort them desc using verson_compare
3. foreach them in order, and take the last one not having a
corresponding release branch ("release/X.Y")