-
Notifications
You must be signed in to change notification settings - Fork 5
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
[SITE-1585] Move check-commits into GitHub actions #146
Conversation
this may or may not work depending on how GHA sources files, but we'll start here
don't run playwright tests if ci failed
@@ -35,7 +35,7 @@ function identify_commit_type() { | |||
# Verifies that the given commit does not contain forbidden files. | |||
function only_allowed_files() { | |||
local commit=$1 | |||
local forbidden_files=("composer.lock" ".github/workflows/ci.yml") | |||
local forbidden_files=("composer.lock" "package-lock.json") |
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.
Why remove .github/workflows/ci.yml?
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.
For the immediate need, it was blocking the workflow from running on this PR. However, I tried to figure out why we added it in the first place and it looked like a "¯_(ツ)_/¯ maybe this will fix something" addition. There was no ticket associated with it and I don't really know why we would be disallowing changes to the workflow (they're non-release changes anyway).
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.
LGTM.
* just add a step that runs the script this may or may not work depending on how GHA sources files, but we'll start here * specify the path * run a git fetch before running the script * check out default branch so we have a local copy * check out a local copy of default * don't warn about detached head * allow changes to ci.yml * remove `variable` * create a failure status artifact don't run playwright tests if ci failed * don't create a status file if it already exists * create an aggregate status file * use the same php-version matrix * remove aggregate status * pull and aggregate all statuses * update perms and add logging * trigger on workflow dispatch * remove status checks * trigger workflow on success * add token * re-add the status artifacts * go back to running on PR * wait for the status artifacts and check them before running the tests * remove test job * add missing done * add some debugging code * make the files unique * allow gh run download to fail * upload the artifacts * add a comment when we're done checking the linting status * comment on the PR * update permissions * exclude status check files
* just add a step that runs the script this may or may not work depending on how GHA sources files, but we'll start here * specify the path * run a git fetch before running the script * check out default branch so we have a local copy * check out a local copy of default * don't warn about detached head * allow changes to ci.yml * remove `variable` * create a failure status artifact don't run playwright tests if ci failed * don't create a status file if it already exists * create an aggregate status file * use the same php-version matrix * remove aggregate status * pull and aggregate all statuses * update perms and add logging * trigger on workflow dispatch * remove status checks * trigger workflow on success * add token * re-add the status artifacts * go back to running on PR * wait for the status artifacts and check them before running the tests * remove test job * add missing done * add some debugging code * make the files unique * allow gh run download to fail * upload the artifacts * add a comment when we're done checking the linting status * comment on the PR * update permissions * exclude status check files
This PR moves the
check-commits
script into a GitHub action workflow. It does not remove it from the deploy workflow, but adding it to a GHA workflow means that if we would mix non-release and release commits in a single PR, we are alerted early because the PR will fail.This PR also creates a relationship between the Playwright (functional) tests and the linting tests and commit checks. If anything in the linting tests (
ci.yml
) fails, it prevents the Playwright tests from executing.If the check-commits script fails -- and finds mixed commits to release and non-release files in the same PR -- a message is added to the PR and the workflow fails.
This does not change or fix the issues in the upstream or solve the issue described in SITE-1585, but it will (attempt to) prevent issues that currently exist in the upstream from happening again by failing the PR early.