Skip to content

Commit

Permalink
chore: fix flaky tests on CI (#10424)
Browse files Browse the repository at this point in the history
  • Loading branch information
alessbell committed Jan 12, 2023
1 parent 71d0ecd commit ce34e5d
Show file tree
Hide file tree
Showing 31 changed files with 2,269 additions and 351 deletions.
34 changes: 12 additions & 22 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,25 @@ version: 2
jobs:
Filesize:
docker:
- image: circleci/node:16.13.1
- image: cimg/node:18.12.0
steps:
- checkout
- run: npm run ci:precheck
- run: npm version
- run: npm ci
- run: npm run bundlesize

Lint:
docker:
- image: cimg/node:18.12.0
steps:
- checkout
- run: npm version
- run: npm ci
- run: npm run lint

Tests:
docker:
- image: circleci/node:16.10.0
- image: cimg/node:18.12.0
steps:
- checkout
- run: npm run ci:precheck
Expand All @@ -29,28 +37,10 @@ jobs:
- store_artifacts:
path: reports/junit

# Ensure that any PR that changes packages has a changeset on it (perhaps
# an empty one created with `changeset --empty`).
# We run the Changesets job itself on all branches so that we can require
# it to pass, but we don't run any steps on the "Version Packages" PRs
# themselves.
Changesets:
docker:
- image: circleci/node:16.13.1
steps:
- checkout
- run: npm ci
- unless:
condition:
matches:
pattern: "^changeset-release/.+$"
value: << pipeline.git.branch >>
steps:
- run: npm run changeset-check

workflows:
version: 2
Build and Test:
jobs:
- Filesize
- Tests
- Lint
13 changes: 13 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"overrides": [
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"files": ["**/__tests__/**/*.[jt]sx", "**/?(*.)+(test).[jt]sx"],
"extends": ["plugin:testing-library/react"],
"rules": {
"testing-library/prefer-user-event": "error"
}
}
]
}
Loading

0 comments on commit ce34e5d

Please sign in to comment.