UNPKG

1.34 kBYAMLView Raw
1language: node_js
2cache: npm
3
4# Trigger a push build on master and greenkeeper branches + PRs build on every branches
5# Avoid double build on PRs (See https://github.com/travis-ci/travis-ci/issues/1147)
6branches:
7 only:
8 - master
9 - /^greenkeeper.*$/
10
11jobs:
12 include:
13 - stage: test
14 node_js: 8
15 - node_js: 10
16 env: Node 10 & coverage upload
17 after_script:
18 - npm run coverage:upload
19 - node_js: lts/*
20 env: memory-test
21 script: npm run test:memory
22 - stage: release
23 env: semantic-release
24 node_js: lts/*
25 script: npx semantic-release
26
27 # when Greenkeeper updates @octokit/routes, run "generate-routes" script
28 # and push new routes.json file to the pull request
29 - stage: greenkeeper-routes-update
30 node_js: lts/*
31 script:
32 - git checkout $TRAVIS_BRANCH
33 - node scripts/generate-routes
34 # commit changes and push back to branch on GitHub. If there are no changes then exit without error
35 - 'git commit -a -m "build: routes" --author="Octokit Bot <octokitbot@martynus.net>" && git push "https://${GH_TOKEN}@github.com/$TRAVIS_REPO_SLUG" ${TRAVIS_BRANCH} || true'
36
37stages:
38 - test
39 - name: release
40 if: branch = master AND type IN (push)
41 - name: greenkeeper-routes-update
42 if: branch =~ ^greenkeeper/@octokit/routes