Skip to content

Commit 0707433

Browse files
Arthur AgombartArthur Agombart
Arthur Agombart
authored and
Arthur Agombart
committed
chore(ci): switch again to CircleCI
1 parent d53da62 commit 0707433

File tree

4 files changed

+55
-45
lines changed

4 files changed

+55
-45
lines changed

.circleci/commit-lockfile.sh

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
PROJECT_LOCKFILE=${PROJECT_LOCKFILE:-"package-lock.json"}
4+
GITHUB_EMAIL=${GITHUB_EMAIL:-"task-runner@circleci"}
5+
GITHUB_NAME=${GITHUB_NAME:-"Circle CI<$GITHUB_EMAIL>"}
6+
7+
if [[ $CIRCLE_BRANCH != *"greenkeeper"* ]]; then
8+
exit 0
9+
fi
10+
11+
if ! git diff-index --quiet HEAD $PROJECT_LOCKFILE --; then
12+
git config user.email $GITHUB_EMAIL
13+
git config user.name $GITHUB_NAME
14+
15+
git add $PROJECT_LOCKFILE
16+
git commit -m "chore(*): update lockfile [ci skip]" -m "See: $CIRCLE_BUILD_URL"
17+
git push origin $CIRCLE_BRANCH
18+
fi

.circleci/config.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Javascript Node CircleCI 2.0 configuration file
2+
#
3+
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
4+
#
5+
version: 2
6+
jobs:
7+
build:
8+
docker:
9+
# https://circleci.com/docs/2.0/circleci-images/
10+
- image: circleci/node:9-browsers
11+
12+
steps:
13+
- checkout
14+
15+
- restore_cache:
16+
keys:
17+
- dependencies-{{ checksum "package.json" }}
18+
- dependencies-
19+
20+
- run:
21+
name: Install dependencies
22+
command: npm i
23+
24+
- save_cache:
25+
paths:
26+
- node_modules
27+
key: dependencies-{{ checksum "package.json" }}
28+
29+
- run:
30+
name: Executing tests
31+
command: npm test
32+
33+
- run:
34+
name: Update Lockfile
35+
command: .circleci/commit-lockfile.sh
36+
37+

.travis.yml

-27
This file was deleted.

ci/commit-lockfile.sh

-18
This file was deleted.

0 commit comments

Comments
 (0)