Skip to content

Commit a01cce8

Browse files
chrisallosravan-s
andauthored
feat: Setup CircleCI for lint and test (#541)
We have decided to use Circle CI as the main CI tool - Reduce cost from github - Parity with other JS projects in the company Changes: * Add circle CI * Setup Lint, Test * Update Jest minor version Todo/Seperate PR: * Remove GH-Action * Setup coverage Fixes: [CORE-5381](https://sendbird.atlassian.net/browse/CORE-5381) Co-authored-by: Chris Heo<[email protected]>, Sravan S <[email protected]>
1 parent 0fb0142 commit a01cce8

File tree

3 files changed

+58
-6
lines changed

3 files changed

+58
-6
lines changed

.circleci/config.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Use the latest 2.1 version of CircleCI pipeline process engine.
2+
# See: https://circleci.com/docs/2.0/configuration-reference
3+
version: 2.1
4+
5+
commands:
6+
command-lint:
7+
steps:
8+
- run:
9+
name: UIKit for React lint
10+
command: |
11+
yarn run eslint
12+
yarn run eslint-ts
13+
no_output_timeout: 5m
14+
command-test:
15+
steps:
16+
- run:
17+
name: UIKit for React test
18+
command: yarn run test
19+
no_output_timeout: 15m
20+
21+
# Define a job to be invoked later in a workflow.
22+
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
23+
jobs:
24+
job-lint_and_test:
25+
docker:
26+
- image: cimg/node:16.19.1
27+
parallelism: 4
28+
resource_class: large
29+
steps:
30+
- checkout
31+
- run: node --version
32+
- run: corepack enable
33+
- run: corepack prepare yarn@stable --activate
34+
- run: yarn --version
35+
- restore_cache:
36+
name: Restore Yarn Package Cache
37+
keys:
38+
- uikit-yarn-dependencies-{{ checksum "yarn.lock" }}
39+
- run: yarn install --immutable
40+
- command-lint
41+
- command-test
42+
- save_cache:
43+
key: uikit-yarn-dependencies-{{ checksum "yarn.lock" }}
44+
paths:
45+
- ./.yarn/cache
46+
47+
# Invoke jobs via workflows
48+
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
49+
workflows:
50+
built-and-test:
51+
jobs:
52+
- job-lint_and_test

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@
122122
"eslint-plugin-react-hooks": "^4.6.0",
123123
"global-jsdom": "^8.5.0",
124124
"husky": "^8.0.0",
125-
"jest": "^29.0.1",
126-
"jest-environment-jsdom": "^29.0.1",
125+
"jest": "29.5.0",
126+
"jest-environment-jsdom": "29.5.0",
127127
"jest-extended": "^3.2.4",
128128
"jsdom": "^20.0.0",
129129
"np": "^7.5.0",

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2494,8 +2494,8 @@ __metadata:
24942494
eslint-plugin-react-hooks: ^4.6.0
24952495
global-jsdom: ^8.5.0
24962496
husky: ^8.0.0
2497-
jest: ^29.0.1
2498-
jest-environment-jsdom: ^29.0.1
2497+
jest: 29.5.0
2498+
jest-environment-jsdom: 29.5.0
24992499
jest-extended: ^3.2.4
25002500
jsdom: ^20.0.0
25012501
np: ^7.5.0
@@ -12052,7 +12052,7 @@ __metadata:
1205212052
languageName: node
1205312053
linkType: hard
1205412054

12055-
"jest-environment-jsdom@npm:^29.0.1":
12055+
"jest-environment-jsdom@npm:29.5.0":
1205612056
version: 29.5.0
1205712057
resolution: "jest-environment-jsdom@npm:29.5.0"
1205812058
dependencies:
@@ -12452,7 +12452,7 @@ __metadata:
1245212452
languageName: node
1245312453
linkType: hard
1245412454

12455-
"jest@npm:^29.0.1":
12455+
"jest@npm:29.5.0":
1245612456
version: 29.5.0
1245712457
resolution: "jest@npm:29.5.0"
1245812458
dependencies:

0 commit comments

Comments
 (0)