Skip to content

Commit c383a63

Browse files
committed
refactor: update circleci config
1 parent 41301bd commit c383a63

File tree

2 files changed

+54
-36
lines changed

2 files changed

+54
-36
lines changed

templates/common/$.circleci/config.yml

Lines changed: 53 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
1-
version: 2
1+
version: 2.1
22

3-
defaults: &defaults
4-
docker:
5-
- image: circleci/node:10
6-
working_directory: ~/project
3+
executors:
4+
default:
5+
docker:
6+
- image: circleci/node:10
7+
working_directory: ~/project
8+
9+
commands:
10+
attach_project:
11+
steps:
12+
- attach_workspace:
13+
at: ~/project
714

815
jobs:
916
install-dependencies:
10-
<<: *defaults
17+
executor: default
1118
steps:
1219
- checkout
13-
- attach_workspace:
14-
at: ~/project
20+
- attach_project
1521
- restore_cache:
1622
keys:
1723
- dependencies-{{ checksum "package.json" }}
@@ -20,9 +26,11 @@ jobs:
2026
keys:
2127
- dependencies-example-{{ checksum "example/package.json" }}
2228
- dependencies-example-
23-
- run: |
24-
yarn install --cwd example --frozen-lockfile
25-
yarn install --frozen-lockfile
29+
- run:
30+
name: Install dependencies
31+
command: |
32+
yarn install --cwd example --frozen-lockfile
33+
yarn install --frozen-lockfile
2634
- save_cache:
2735
key: dependencies-{{ checksum "package.json" }}
2836
paths: node_modules
@@ -32,38 +40,47 @@ jobs:
3240
- persist_to_workspace:
3341
root: .
3442
paths: .
43+
3544
lint:
36-
<<: *defaults
37-
steps:
38-
- attach_workspace:
39-
at: ~/project
40-
- run: |
45+
executor: default
46+
steps:
47+
- attach_project
48+
- run:
49+
name: Lint files
50+
command: |
4151
yarn lint
52+
4253
typescript:
43-
<<: *defaults
44-
steps:
45-
- attach_workspace:
46-
at: ~/project
47-
- run: yarn typescript
54+
executor: default
55+
steps:
56+
- attach_project
57+
- run:
58+
name: Typecheck files
59+
command: |
60+
yarn typescript
61+
4862
unit-tests:
49-
<<: *defaults
50-
steps:
51-
- attach_workspace:
52-
at: ~/project
53-
- run: yarn test --coverage
54-
- store_artifacts:
55-
path: coverage
56-
destination: coverage
57-
build-package:
58-
<<: *defaults
59-
steps:
60-
- attach_workspace:
61-
at: ~/project
62-
- run: yarn prepare
63+
executor: default
64+
steps:
65+
- attach_project
66+
- run:
67+
name: Run unit tests
68+
command: |
69+
yarn test --coverage
70+
- store_artifacts:
71+
path: coverage
72+
destination: coverage
6373

74+
build-package:
75+
executor: default
76+
steps:
77+
- attach_project
78+
- run:
79+
name: Build package
80+
command: |
81+
yarn prepare
6482
6583
workflows:
66-
version: 2
6784
build-and-test:
6885
jobs:
6986
- install-dependencies

templates/cpp-library/ios/<%= project.name %>.mm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ @implementation <%= project.name %>
55
RCT_EXPORT_MODULE()
66

77
// Example method for C++
8+
// See the implementation of the example module in the `cpp` folder
89
RCT_EXPORT_METHOD(multiply:(nonnull NSNumber*)a withB:(nonnull NSNumber*)b
910
withResolver:(RCTPromiseResolveBlock)resolve
1011
withReject:(RCTPromiseRejectBlock)reject)

0 commit comments

Comments
 (0)