Skip to content

Commit 17c376c

Browse files
committed
ci: add CircleCI configuration
1 parent 05a2051 commit 17c376c

File tree

4 files changed

+60
-2
lines changed

4 files changed

+60
-2
lines changed

.circleci/config.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
version: 2.1
2+
3+
jobs:
4+
build:
5+
working_directory: ~/repo
6+
docker:
7+
- image: circleci/node:12
8+
steps:
9+
- checkout
10+
- restore_cache:
11+
keys:
12+
- yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }}
13+
- yarn-packages-v1-{{ .Branch }}-
14+
- yarn-packages-v1-
15+
- run:
16+
name: yarn install
17+
command: yarn install --frozen-lockfile
18+
- save_cache:
19+
key: yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }}
20+
paths:
21+
- ~/.cache/yarn
22+
- run: mkdir artifacts
23+
- run:
24+
name: lint
25+
command: yarn lint --format junit --output-file ./artifacts/eslint/results.xml
26+
- run:
27+
name: test
28+
command: yarn test --ci --reporters=default --reporters=jest-junit
29+
- store_artifacts:
30+
path: artifacts/eslint/results.xml
31+
prefix: lint
32+
- store_artifacts:
33+
path: artifacts/jest/results.xml
34+
prefix: tests
35+
- store_test_results:
36+
path: artifacts

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
artifacts/
12
dist/
23

34
### Node ###

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"eslint-plugin-react": "^7.14.3",
4949
"eslint-plugin-react-hooks": "^1.7.0",
5050
"jest": "^25.1.0",
51+
"jest-junit": "^10.0.0",
5152
"react": "16.12.0",
5253
"react-dom": "16.12.0",
5354
"react-native": "^0.61.5",
@@ -62,5 +63,9 @@
6263
"transformIgnorePatterns": [
6364
"node_modules/(?!(react-native|autolinker)/)"
6465
]
66+
},
67+
"jest-junit": {
68+
"outputDirectory": "./artifacts/jest",
69+
"outputName": "results.xml"
6570
}
6671
}

yarn.lock

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3786,6 +3786,17 @@ jest-jasmine2@^25.1.0:
37863786
pretty-format "^25.1.0"
37873787
throat "^5.0.0"
37883788

3789+
jest-junit@^10.0.0:
3790+
version "10.0.0"
3791+
resolved "https://registry.yarnpkg.com/jest-junit/-/jest-junit-10.0.0.tgz#c94b91c24920a327c9d2a075e897b2dba4af494b"
3792+
integrity sha512-dbOVRyxHprdSpwSAR9/YshLwmnwf+RSl5hf0kCGlhAcEeZY9aRqo4oNmaT0tLC16Zy9D0zekDjWkjHGjXlglaQ==
3793+
dependencies:
3794+
jest-validate "^24.9.0"
3795+
mkdirp "^0.5.1"
3796+
strip-ansi "^5.2.0"
3797+
uuid "^3.3.3"
3798+
xml "^1.0.1"
3799+
37893800
jest-leak-detector@^25.1.0:
37903801
version "25.1.0"
37913802
resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-25.1.0.tgz#ed6872d15aa1c72c0732d01bd073dacc7c38b5c6"
@@ -3989,7 +4000,7 @@ jest-util@^25.1.0:
39894000
is-ci "^2.0.0"
39904001
mkdirp "^0.5.1"
39914002

3992-
jest-validate@^24.7.0:
4003+
jest-validate@^24.7.0, jest-validate@^24.9.0:
39934004
version "24.9.0"
39944005
resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-24.9.0.tgz#0775c55360d173cd854e40180756d4ff52def8ab"
39954006
integrity sha512-HPIt6C5ACwiqSiwi+OfSSHbK8sG7akG8eATl+IPKaeIjtPOeBUd/g3J7DghugzxrGjI93qS/+RPKe1H6PqvhRQ==
@@ -6701,7 +6712,7 @@ utils-merge@1.0.1:
67016712
resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
67026713
integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=
67036714

6704-
uuid@^3.3.2:
6715+
uuid@^3.3.2, uuid@^3.3.3:
67056716
version "3.4.0"
67066717
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee"
67076718
integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==
@@ -6915,6 +6926,11 @@ xml-name-validator@^3.0.0:
69156926
resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a"
69166927
integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==
69176928

6929+
xml@^1.0.1:
6930+
version "1.0.1"
6931+
resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5"
6932+
integrity sha1-eLpyAgApxbyHuKgaPPzXS0ovweU=
6933+
69186934
xmlbuilder@^9.0.7:
69196935
version "9.0.7"
69206936
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d"

0 commit comments

Comments
 (0)