-
Notifications
You must be signed in to change notification settings - Fork 3.3k
chore: use circleci cli to package ci configurations #32462
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
base: develop
Are you sure you want to change the base?
Conversation
…cleci config pack to compose them into the main workflows.yml file
cypress
|
Project |
cypress
|
Branch Review |
use-pack-for-circle
|
Run status |
|
Run duration | 21m 43s |
Commit |
|
Committer | cypress-bot[bot] |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
0
|
|
2
|
|
28
|
|
0
|
|
791
|
View all changes introduced in this branch ↗︎ |
UI Coverage
62.34%
|
|
---|---|
|
27
|
|
48
|
Accessibility
99%
|
|
---|---|
|
0 critical
3 serious
1 moderate
0 minor
|
|
18
|
@@ -278,7 +278,7 @@ describe('open', () => { | |||
errCb(err) | |||
|
|||
expect(process.exit).toHaveBeenCalledWith(1) | |||
// eslint-disable-next-line no-console | |||
|
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.
linting was failing without these changes
value: << pipeline.git.branch >> | ||
- not: | ||
matches: | ||
pattern: /^pull\/[0-9]+/ |
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.
contributor prs still use the contributor linux-x64 workflow, for now. for an idea about how we can simplify that: #32494
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.
that would be nice because not everything runs the same. It'd be nice to have that logic more clearly separated out.
@@ -0,0 +1,2844 @@ | |||
version: 2.1 | |||
|
|||
chrome-stable-version: &chrome-stable-version "140.0.7339.127" |
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 github action likely needs to be updated that was originally updating the .circleci/workflow
file for the latest browser version. We are also using the yaml
package to format the config. I did some work to port it over in https://github.com/cypress-io/cypress/pull/30989/files so hopefully that paints enough context if/what needs to change
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.
Updated the scripts & left a comment that updating them is necessary in 5fb5125
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.
Might just want to verify this works after merge. I did run it, but there's no browser version updates so it didn't trigger the whole thing. https://github.com/cypress-io/cypress/actions/runs/17800753588
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.
@cacieprins Can you add this branch to run the extended windows, binary, etc tests to ensure that workflow still works the same when you want it to run on your PR?
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.
I went through and compared the jobs run + required job chain in CircleCI on previous branches to this one. Everything is running the same (although I wasn't able to verify that the 'ready-to-release' job will run since the dependent jobs have not all passed at any point.)
@@ -0,0 +1,49 @@ | |||
resource_class: small |
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 strangely maxes out its resources checking out code. I wonder if this could be sped up with more. (I realize you didn't change this from before). https://app.circleci.com/pipelines/github/cypress-io/cypress/74784/workflows/2d0ba1d8-892a-4aee-9cac-b0d07ffd0700/jobs/3142881/resources
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.
Oh, probably! We could switch this to medium. We could also do some custom git credential stuff and do a super shallow checkout - all we need is the target workflow file. The baked in checkout
command does a pretty good job of doing the minimal, but it can't carve it down that far.
I'd suggest we just bump it to medium, if we'd like to speed it up. There are much lower hanging fruit in the main pipeline for cost/performance.
echo "❌ Warning: CircleCI CLI not found! Install the CircleCi CLI to edit the CircleCI configuration." | ||
exit 1 | ||
fi |
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.
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.
echo " 🔍 Validating ${output_file}" | ||
if ! circleci config validate "$output_file"; then | ||
echo " ❌ Validating ${output_file} failed" | ||
exit 1 | ||
fi | ||
echo " ✅ ${dirname}.yml configuration validated successfully" |
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.
@cacieprins Are these meant to run on the full run? They run on develop on the linux job, but not on this run with the 'full-workflow. (Not saying it necessarily should, just wanting to confirm what we want as the behavior here) Also, it seems this branch is running both a ![]() ![]() |
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.
Perhaps revisit something to check in CI if someone skips the precommit hooks
echo "❌ Warning: CircleCI CLI not found! Install the CircleCi CLI to edit the CircleCI configuration." | ||
exit 1 | ||
fi |
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.
Additional details
While the line count of the main
workflows.yml
has increased quite a bit, this is becausecircleci config pack
unrolls/expands all anchors in the source yml files.circleci config pack
uses the FYAML convention to be able to break yaml files into smaller, easier to digest chunks.This PR:
.circleci/src/workflows
pull-request
workflow, which at the moment is identical tolinux-x64
except it does not include references to any of the jobs excluded by the main build filtersconfig.yml
to.circleci/src/config
.circleci/src
to a yaml file defined by the directory name in.circleci/
circleci config validate
on these packed yml files, to ensure that they are valid circleci configsSteps to test
How has the user experience changed?
PR Tasks
cypress-documentation
?type definitions
?