Skip to content

Commit 73379e4

Browse files
committed
feat(circleci): add circleci
1 parent 102d838 commit 73379e4

File tree

3 files changed

+106
-21
lines changed

3 files changed

+106
-21
lines changed

.circleci/config.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
2+
version: 2.1
3+
orbs:
4+
commitlint: conventional-changelog/commitlint@1.0.0
5+
6+
executors:
7+
default-executor:
8+
docker:
9+
- image: "cimg/node:lts"
10+
working_directory: ~/project
11+
resource_class: medium
12+
13+
commands:
14+
restore_test_cache:
15+
steps:
16+
- restore_cache:
17+
keys:
18+
- v1-deps-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{ .Revision }}
19+
- v1-deps-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}
20+
- v1-deps-
21+
save_test_cache:
22+
steps:
23+
- save_cache:
24+
key: v1-deps-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{ .Revision }}
25+
paths:
26+
- node_modules
27+
- ~/.npm
28+
setup:
29+
steps:
30+
- run:
31+
name: Setup
32+
command: |
33+
npm prune
34+
test:
35+
steps:
36+
- run:
37+
name: Test
38+
command: |
39+
npm run test
40+
deploy:
41+
steps:
42+
- run:
43+
name: Deploy
44+
command: |
45+
npm run semantic-release
46+
47+
jobs:
48+
build-and-test:
49+
executor: default-executor
50+
steps:
51+
- checkout
52+
- restore_test_cache
53+
- setup
54+
- save_test_cache
55+
- test
56+
- persist_to_workspace:
57+
root: ~/project
58+
paths: .
59+
deploy:
60+
executor: default-executor
61+
steps:
62+
- attach_workspace:
63+
at: ~/project
64+
- deploy
65+
66+
workflows:
67+
commitlint:
68+
when:
69+
not:
70+
or:
71+
- equal: [ master, <<pipeline.git.branch>> ]
72+
- equal: [ develop, <<pipeline.git.branch>> ]
73+
- matches: { pattern: "^hotfix.*", value: <<pipeline.git.branch>> }
74+
- matches: { pattern: "^release.*", value: <<pipeline.git.branch>> }
75+
jobs:
76+
- commitlint/lint:
77+
target-branch: master
78+
79+
build-and-test-workflow:
80+
when:
81+
not:
82+
or:
83+
- equal: [ master, <<pipeline.git.branch>> ]
84+
- equal: [ develop, <<pipeline.git.branch>> ]
85+
- matches: { pattern: "^hotfix.*", value: <<pipeline.git.branch>> }
86+
- matches: { pattern: "^release.*", value: <<pipeline.git.branch>> }
87+
jobs:
88+
- build-and-test
89+
90+
deploy-workflow:
91+
when:
92+
or:
93+
- equal: [ master, <<pipeline.git.branch>> ]
94+
- equal: [ develop, <<pipeline.git.branch>> ]
95+
- matches: { pattern: "^hotfix.*", value: <<pipeline.git.branch>> }
96+
- matches: { pattern: "^release.*", value: <<pipeline.git.branch>> }
97+
- matches: { pattern: "^v[0-9]*.[0-9]*.[0-9]*$", value: <<pipeline.git.branch>> }
98+
99+
jobs:
100+
- build-and-test
101+
- deploy:
102+
context:
103+
- scratch-npm-creds
104+
requires:
105+
- build-and-test

.travis.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# scratch-parser
22

33
#### Parser for Scratch projects
4+
[![CircleCI](https://circleci.com/gh/LLK/scratch-parser/tree/develop.svg?style=shield&circle-token=8bf55740611abf98152feec3797bac5ee4149c7c)](https://circleci.com/gh/LLK/scratch-parser?branch=develop)
45

5-
[![Build Status](https://travis-ci.org/LLK/scratch-parser.svg?branch=develop)](https://travis-ci.org/LLK/scratch-parser)
66
[![dependencies Status](https://david-dm.org/llk/scratch-parser/status.svg)](https://david-dm.org/llk/scratch-parser)
77
[![devDependencies Status](https://david-dm.org/llk/scratch-parser/dev-status.svg)](https://david-dm.org/llk/scratch-parser?type=dev)
88

0 commit comments

Comments
 (0)