Skip to content

Commit 9ba7cd5

Browse files
committed
[HASHES]: config.yml for circleci
1 parent f930639 commit 9ba7cd5

File tree

2 files changed

+90
-0
lines changed

2 files changed

+90
-0
lines changed

.circleci/config.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
version: 2
3+
jobs:
4+
node-latest: &test
5+
docker:
6+
- image: node:latest
7+
working_directory: ~/cli
8+
steps:
9+
- checkout
10+
- restore_cache: &restore_cache
11+
keys:
12+
- v1-npm-{{checksum ".circleci/config.yml"}}-{{ checksum "package-lock.json"}}
13+
- v1-npm-{{checksum ".circleci/config.yml"}}
14+
- run:
15+
name: Install dependencies
16+
command: .circleci/greenkeeper
17+
- run: ./bin/run --version
18+
- run: ./bin/run --help
19+
- run:
20+
name: Testing
21+
command: npm test
22+
- run:
23+
name: Submitting code coverage to codecov
24+
command: |
25+
./node_modules/.bin/nyc report --reporter text-lcov > coverage.lcov
26+
curl -s https://codecov.io/bash | bash
27+
node-8:
28+
<<: *test
29+
docker:
30+
- image: node:8
31+
release:
32+
<<: *test
33+
steps:
34+
- add_ssh_keys
35+
- checkout
36+
- restore_cache: *restore_cache
37+
- run:
38+
name: Install dependencies
39+
command: |
40+
npm install -g @oclif/semantic-release@3 semantic-release@15
41+
npm install
42+
- run:
43+
name: Cutting release
44+
command: |
45+
semantic-release -e @oclif/semantic-release
46+
- save_cache:
47+
key: v1-yarn-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}}
48+
paths:
49+
- ~/cli/node_modules
50+
- ~/.npm
51+
- /usr/local/lib/node_modules
52+
53+
workflows:
54+
version: 2
55+
"cdt":
56+
jobs:
57+
- node-latest
58+
- node-8
59+
- release:
60+
context: org-global
61+
filters:
62+
branches: {only: master}
63+
requires:
64+
- node-latest
65+
- node-8

.circleci/greenkeeper

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
3+
set -ex
4+
5+
PATH=/usr/local/share/.config/yarn/global/node_modules/.bin:$PATH
6+
7+
if [[ "$CIRCLE_BRANCH" != greenkeeper/* ]]; then
8+
yarn
9+
# yarn check
10+
exit 0
11+
fi
12+
13+
if [[ ! -z "$GIT_EMAIL" ]] & [[ ! -z "$GIT_USERNAME" ]]; then
14+
git config --global push.default simple
15+
git config --global user.email "$GIT_EMAIL"
16+
git config --global user.name "$GIT_USERNAME"
17+
fi
18+
19+
if [[ ! -x "$(command -v greenkeeper-lockfile-update)" ]]; then
20+
yarn global add greenkeeper-lockfile@1
21+
fi
22+
23+
greenkeeper-lockfile-update
24+
yarn
25+
greenkeeper-lockfile-upload

0 commit comments

Comments
 (0)