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

Commit 948d121

Browse files
committed
ci(travis): utilize Build Stages
Utilize Build Stages in the Travis CI configuration to run `commit-lint`in its own job, and run the deploy only on commits to master.
1 parent 248468a commit 948d121

File tree

1 file changed

+36
-19
lines changed

1 file changed

+36
-19
lines changed

.travis.yml

Lines changed: 36 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,42 @@
11
### Project specific config ###
2-
language: generic
2+
language: node_js
3+
node_js: lts/*
4+
install: skip
5+
os: linux
36

4-
matrix:
7+
jobs:
58
include:
6-
- os: linux
9+
# Test Atom versions
10+
- stage: test
711
env: ATOM_CHANNEL=stable
8-
9-
- os: linux
12+
- stage: test
1013
env: ATOM_CHANNEL=beta
1114

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

1841
notifications:
1942
email:
@@ -23,6 +46,7 @@ notifications:
2346
branches:
2447
only:
2548
- master
49+
- "/^greenkeeper/.*$/"
2650

2751
git:
2852
depth: 10
@@ -35,18 +59,11 @@ addons:
3559
apt:
3660
packages:
3761
- build-essential
38-
- fakeroot
3962
- 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/
63+
- libgnome-keyring-dev
64+
- fakeroot
4765

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

0 commit comments

Comments
 (0)