Skip to content

Commit 05ef557

Browse files
committed
chore(ci): enable TravisCI
1 parent ea91401 commit 05ef557

File tree

3 files changed

+45
-43
lines changed

3 files changed

+45
-43
lines changed

.circleci/config.yml

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

.travis.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
dist: trusty
2+
sudo: false
3+
language: node_js
4+
node_js:
5+
- 9
6+
7+
cache:
8+
directories:
9+
- "node_modules"
10+
11+
git:
12+
depth: false
13+
14+
branches:
15+
only:
16+
- master
17+
18+
before_script:
19+
- bash ci/commit-lockfile.sh
20+
21+
notifications:
22+
email: false
23+
slack:
24+
on_success: change
25+
on_failure: always
26+
rooms:
27+
- heyprof:OnsMQaj2FtGkJ972FzpPw60T#pipelines-front

ci/commit-lockfile.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
if [[ $TRAVIS_PULL_REQUEST_BRANCH != *"greenkeeper"* ]]; then
4+
exit 0
5+
fi
6+
7+
if ! git diff-index --quiet HEAD --; then
8+
git config --global user.email "$GITHUB_EMAIL"
9+
git config --global user.name "Travis CI"
10+
git config --global push.default simple
11+
git remote add jenkins https://"$GITHUB_TOKEN"@github.com/"$TRAVIS_REPO_SLUG".git
12+
13+
git add package-lock.json
14+
git commit -m "chore(*): update lockfile [ci skip]"
15+
LAST_COMMIT=`git rev-parse HEAD`
16+
git push jenkins $LAST_COMMIT:$TRAVIS_PULL_REQUEST_BRANCH
17+
git remote rm jenkins
18+
fi

0 commit comments

Comments
 (0)