Skip to content

Commit 8df6ea6

Browse files
authored
Merge pull request #29 from snyk/chore/move-to-circleci
chore: move to CircleCI
2 parents 92f6b11 + 99f3b0d commit 8df6ea6

File tree

5 files changed

+119
-67
lines changed

5 files changed

+119
-67
lines changed

.circleci/config.yml

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
version: 2.1
2+
3+
defaults: &defaults
4+
parameters:
5+
node_version:
6+
type: string
7+
default: ""
8+
9+
commands:
10+
npmrc:
11+
steps:
12+
- run:
13+
name: Create .npmrc
14+
command: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> .npmrc
15+
16+
setup_git:
17+
steps:
18+
- run:
19+
name: "Setup git environment"
20+
command: git config --global core.autocrlf false
21+
22+
install_node_npm:
23+
<<: *defaults
24+
description: Install specific version of Node
25+
steps:
26+
- run:
27+
name: Installing node version << parameters.node_version >>
28+
command: nvm install << parameters.node_version >>
29+
- run:
30+
name: Using node version << parameters.node_version >>
31+
command: nvm use << parameters.node_version >>
32+
33+
show_node_npm_version:
34+
description: Log Node and npm version
35+
steps:
36+
- run:
37+
name: Node version
38+
command: node --version
39+
- run:
40+
name: NPM version
41+
command: npm --version
42+
43+
install_deps:
44+
description: Install dependencies
45+
steps:
46+
- run:
47+
name: Install npm dependencies
48+
command: npm install
49+
jobs:
50+
lint:
51+
<<: *defaults
52+
docker:
53+
- image: circleci/node:<< parameters.node_version >>
54+
steps:
55+
- checkout
56+
- show_node_npm_version
57+
- install_deps
58+
- run:
59+
name: Run lint
60+
command: npm run lint
61+
62+
test-unix:
63+
<<: *defaults
64+
docker:
65+
- image: circleci/node:<< parameters.node_version >>
66+
steps:
67+
- checkout
68+
- show_node_npm_version
69+
- install_deps
70+
- run:
71+
name: Run tests
72+
command: npm run test:unit
73+
74+
release:
75+
<<: *defaults
76+
docker:
77+
- image: circleci/node:<< parameters.node_version >>
78+
resource_class: small
79+
steps:
80+
- checkout
81+
- install_deps
82+
- run:
83+
name: Release
84+
command: npx semantic-release
85+
86+
workflows:
87+
version: 2
88+
test_and_release:
89+
jobs:
90+
- lint:
91+
name: lint
92+
context: nodejs-install
93+
node_version: "12"
94+
95+
# UNIX tests
96+
- test-unix:
97+
name: Unix Tests for Node << matrix.node_version >>
98+
context: nodejs-install
99+
requires:
100+
- lint
101+
matrix:
102+
parameters:
103+
node_version: ["16.13.1", "14.18.2", "12.22.7"]
104+
105+
- release:
106+
name: Release
107+
context: nodejs-lib-release
108+
node_version: "lts"
109+
requires:
110+
- lint
111+
- test-unix
112+
filters:
113+
branches:
114+
only:
115+
- master

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @snyk/loki
1+
* @snyk/poke

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ yarn.lock
1010
.eslintcache
1111
coverage/
1212
# Diagnostic reports (https://nodejs.org/api/report.html)
13-
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
13+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
14+
#IDEs
15+
.idea

.travis.yml

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

appveyor.yml

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

0 commit comments

Comments
 (0)