Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Commit 29e9ecc

Browse files
committed
ci: use Build Stages in Travis CI
Move to a build stages setup in Travis CI, allowing the deploy stage to only run on commits directly to master. Also splits the `commit-lint` out into a separate job as it doesn't rely on Atom to work.
1 parent fc80af6 commit 29e9ecc

File tree

1 file changed

+34
-20
lines changed

1 file changed

+34
-20
lines changed

.travis.yml

Lines changed: 34 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,39 @@
11
### Project specific config ###
2-
language: generic
2+
language: node_js
3+
node_js: lts/*
4+
os: linux
35

4-
matrix:
6+
jobs:
57
include:
6-
- os: linux
8+
# Test Atom versions
9+
- stage: test
710
env: ATOM_CHANNEL=stable
8-
9-
- os: linux
11+
- stage: test
1012
env: ATOM_CHANNEL=beta
1113

14+
# Check the commit messages and run the extra lint script
15+
- stage: test
16+
install:
17+
- npm install
18+
script:
19+
- commitlint-travis
20+
21+
- stage: release
22+
# Since the deploy needs APM, currently the simplest method is to run
23+
# build-package.sh, which requires the specs to pass.
24+
before_script:
25+
- export PATH=${PATH}:${HOME}/atom/usr/bin/
26+
deploy:
27+
provider: script
28+
skip_cleanup: true
29+
script:
30+
- npx semantic-release
31+
1232
### Generic setup follows ###
13-
script:
33+
install:
1434
- curl -s -O https://raw.githubusercontent.com/atom/ci/master/build-package.sh
1535
- chmod u+x build-package.sh
16-
- ./build-package.sh
36+
- "./build-package.sh"
1737

1838
notifications:
1939
email:
@@ -23,6 +43,7 @@ notifications:
2343
branches:
2444
only:
2545
- master
46+
- "/^greenkeeper/.*$/"
2647

2748
git:
2849
depth: 10
@@ -35,18 +56,11 @@ addons:
3556
apt:
3657
packages:
3758
- build-essential
38-
- fakeroot
3959
- git
40-
- libsecret-1-dev
41-
42-
node_js: lts/*
43-
44-
after_success:
45-
# Add apm to the PATH
46-
- export PATH=${PATH}:${HOME}/atom/usr/bin/
60+
- libgnome-keyring-dev
61+
- fakeroot
4762

48-
deploy:
49-
provider: script
50-
skip_cleanup: true
51-
script:
52-
- npx semantic-release
63+
stages:
64+
- test
65+
- name: release
66+
if: (NOT type = pull_request) AND branch = master

0 commit comments

Comments
 (0)