-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
[code-infra] CircleCI maintenance #1321
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0569345
Remove React 17 pipeline and fix TS tests
michaldudak 2c27a4a
Unify names of CCI jobs
michaldudak e0f705a
fix
michaldudak e144654
Remove unused parameters
michaldudak ac5e6e4
Simplify updating TS
michaldudak 145a6dd
Merge remote-tracking branch 'upstream/master' into circleci-maintenance
michaldudak 7a76d5a
Merge branch 'master' into circleci-maintenance
michaldudak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
version: 2.1 | ||
orbs: | ||
aws-cli: circleci/[email protected] | ||
aws-s3: circleci/[email protected] | ||
|
||
parameters: | ||
browserstack-force: | ||
|
@@ -16,31 +13,17 @@ parameters: | |
description: The name of the workflow to run | ||
type: string | ||
default: pipeline | ||
e2e-base-url: | ||
description: The base url for running end-to-end test | ||
type: string | ||
default: '' | ||
|
||
default-job: &default-job | ||
parameters: | ||
react-version: | ||
description: The version of react to be used | ||
type: string | ||
default: << pipeline.parameters.react-version >> | ||
test-gate: | ||
description: A particular type of tests that should be run | ||
type: string | ||
default: undefined | ||
e2e-base-url: | ||
description: The base url for running end-to-end test | ||
type: string | ||
default: << pipeline.parameters.e2e-base-url >> | ||
environment: | ||
# expose it globally otherwise we have to thread it from each job to the install command | ||
BROWSERSTACK_FORCE: << pipeline.parameters.browserstack-force >> | ||
REACT_VERSION: << parameters.react-version >> | ||
TEST_GATE: << parameters.test-gate >> | ||
AWS_REGION_ARTIFACTS: eu-central-1 | ||
COREPACK_ENABLE_DOWNLOAD_PROMPT: '0' | ||
working_directory: /tmp/base-ui | ||
docker: | ||
|
@@ -172,7 +155,10 @@ jobs: | |
- install_js: | ||
react-version: << parameters.react-version >> | ||
- run: | ||
name: Eslint | ||
name: 'Prettier' | ||
command: pnpm prettier --check | ||
- run: | ||
name: ESlint | ||
command: pnpm eslint:ci | ||
- run: | ||
name: Stylelint | ||
|
@@ -189,9 +175,6 @@ jobs: | |
- checkout | ||
- install_js: | ||
react-version: << parameters.react-version >> | ||
- run: | ||
name: '`pnpm prettier` changes committed?' | ||
command: pnpm prettier --check | ||
- run: | ||
name: Generate PropTypes | ||
command: pnpm proptypes | ||
|
@@ -214,6 +197,11 @@ jobs: | |
command: | | ||
pnpm docs:link-check | ||
git add -A && git diff --exit-code --staged | ||
- run: | ||
name: '`pnpm inline-scripts changes committed?' | ||
command: | | ||
pnpm inline-scripts | ||
git add -A && git diff --exit-code --staged | ||
test_types: | ||
<<: *default-job | ||
resource_class: 'medium+' | ||
|
@@ -245,18 +233,12 @@ jobs: | |
- run: | ||
name: Resolve typescript version | ||
command: | | ||
pnpm add typescript@next -d -w | ||
pnpm update -r typescript@next | ||
# log a patch for maintainers who want to check out this change | ||
git --no-pager diff HEAD | ||
- run: | ||
name: Tests TypeScript definitions | ||
command: | | ||
# ignore build failures | ||
# it's expected that typescript@next fails since the lines of the errors | ||
# change frequently. This build is monitored regardless of its status | ||
set +e | ||
pnpm typescript | ||
exit 0 | ||
command: pnpm typescript | ||
- restore_cache: | ||
name: Restore generated declaration files | ||
keys: | ||
|
@@ -350,71 +332,58 @@ jobs: | |
command: pnpm -r test:package | ||
|
||
workflows: | ||
version: 2 | ||
pipeline: | ||
when: | ||
equal: [pipeline, << pipeline.parameters.workflow >>] | ||
jobs: | ||
- checkout: | ||
<<: *default-context | ||
name: 'Checkout' | ||
- test_unit: | ||
<<: *default-context | ||
name: 'JSDOM tests' | ||
requires: | ||
- checkout | ||
- Checkout | ||
- test_lint: | ||
<<: *default-context | ||
name: 'Linting' | ||
requires: | ||
- checkout | ||
- Checkout | ||
- test_static: | ||
<<: *default-context | ||
name: 'Generated files verification' | ||
requires: | ||
- checkout | ||
- Checkout | ||
- test_types: | ||
<<: *default-context | ||
name: 'Typechecking' | ||
requires: | ||
- checkout | ||
- Checkout | ||
- test_browser: | ||
<<: *default-context | ||
name: 'Browser tests' | ||
requires: | ||
- checkout | ||
- Checkout | ||
- test_regressions: | ||
<<: *default-context | ||
name: 'Regression tests' | ||
requires: | ||
- checkout | ||
- Checkout | ||
- test_e2e: | ||
<<: *default-context | ||
name: 'E2E tests' | ||
requires: | ||
- checkout | ||
- test_bundle_size_monitor: | ||
<<: *default-context | ||
requires: | ||
- checkout | ||
- Checkout | ||
# - test_bundle_size_monitor: | ||
# <<: *default-context | ||
# name: 'Bundle size monitor' | ||
# requires: | ||
# - checkout | ||
- test_package: | ||
<<: *default-context | ||
name: 'Package verification' | ||
requires: | ||
- checkout | ||
react-17: | ||
triggers: | ||
- schedule: | ||
cron: '0 0 * * *' | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
jobs: | ||
- test_unit: | ||
<<: *default-context | ||
react-version: ^17.0.0 | ||
- test_browser: | ||
<<: *default-context | ||
react-version: ^17.0.0 | ||
- test_regressions: | ||
<<: *default-context | ||
react-version: ^17.0.0 | ||
- Checkout | ||
react-18: | ||
when: | ||
equal: [pipeline, << pipeline.parameters.workflow >>] | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
These should probably remain
checkout
as it relies onkey
, not thename
. 🤔The jobs seem stuck now. :/
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.
+1 to keep snake case to match with the rest of the codebase and with https://circleci.com/docs/introduction-to-yaml-configurations/ style.
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.
It does rely on a name. The job seemed stuck as Github checks expect a job with the old name. I will update the GH configuration once the PR is merged so that other PRs aren't stuck.
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.
@oliviertassinari I haven't found anything in the CircleCI that forces or recommends any particular format. In fact, they use different conventions in different parts of the docs (https://circleci.com/docs/configuration-reference/#requires has kebab-case)
I prioritized the readability of GH status checks (especially for external contributors).


Compare
with
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'm all for more readability if it's just a GH config. 👍