-
Notifications
You must be signed in to change notification settings - Fork 12
/
circle.yml
69 lines (67 loc) · 1.82 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
defaults: &defaults
docker:
- image: cimg/node:18.12.0
version: 2
jobs:
build:
<<: *defaults
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
- run:
name: Install npm
command: npm ci
- run:
name: Build
command: npm run build
- run:
name: Check code quality
command: npm run lint
- run:
name: Setup Code Climate test-reporter
command: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
- run:
name: Before-Test
command: ./cc-test-reporter before-build
- run:
name: Execute Tests
command: npm test
- run:
name: After-Test
command: ./cc-test-reporter after-build --coverage-input-type lcov --exit-code $?
- save_cache:
key: dependency-cache-{{ checksum "package.json" }}
paths:
- node_modules
semver:
<<: *defaults
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
- run:
name: Install npm
command: npm install
- run:
name: Prep Dist Folder
command: npm run dist
- run:
name: Build
command: npm run build
- run:
name: Semantic Release
command: node_modules/.bin/semantic-release
workflows:
version: 2
build_test_release:
jobs:
- build
- semver:
requires:
- build
filters:
branches:
only: master