-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Travis optimization #2404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Travis optimization #2404
Changes from 23 commits
cabd893
5321534
03e0dcf
b31f42e
e616a32
64d5ac9
012b534
3efa21d
2bcfb86
10f18df
ba535b5
315cdef
ef4cafa
1bfbcc8
f8a6cf8
df21ca2
b344006
625c6e7
3416ecb
3545917
5d238f4
2dc8216
d0c36fc
0c18717
b88f90b
08dbaef
9f1a1cc
7b9d413
b2b63b6
906455d
03c68df
7d4bb06
b6b2476
fc7676d
993c998
8332fe3
fbd7a2f
65644a1
a2e6146
1ec6c28
80685a7
42f0b1d
dc053d9
ea7f606
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,53 @@ | ||
branches: | ||
only: | ||
- master | ||
- develop | ||
sudo: false | ||
language: node_js | ||
node_js: | ||
- "8" | ||
sudo: required | ||
install: | ||
- yarn | ||
- sudo pip install proselint | ||
before_script: | ||
- source ./src/scripts/env.sh | ||
script: | ||
- bash ./src/scripts/deploy.sh | ||
|
||
cache: | ||
yarn: true | ||
pip: true | ||
directories: | ||
- ./node_modules | ||
- ./dist | ||
- $HOME/.cache | ||
|
||
stages: | ||
- lint | ||
- build | ||
- post-build | ||
|
||
jobs: | ||
fast_finish: true | ||
allow_failures: | ||
- name: Link check | ||
|
||
include: | ||
- stage: lint | ||
name: Linting | ||
before_install: npm install --global yarn | ||
install: yarn | ||
script: | ||
- yarn lint:js | ||
- yarn lint:markdown | ||
- yarn lint:social | ||
|
||
- stage: build | ||
name: Build | ||
before_script: source ./src/scripts/env.sh | ||
script: yarn build | ||
|
||
- stage: post-build | ||
name: Deploy | ||
if: branch = master | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This condition saves There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll clean that up in a bit There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
script: bash ./src/scripts/deploy.sh | ||
|
||
- stage: post-build | ||
name: Link check | ||
script: yarn linkcheck | ||
|
||
- stage: post-build | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why it this one post build? We shouldn't build if this command fails. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can re-order as we see fit later. Right now I just need to get the pieces working, then we can discuss what the pipeline should do. |
||
name: Proselint | ||
language: python | ||
python: 3.6 | ||
install: pip install -r requirements.txt | ||
script: cp .proselintrc ~/ && proselint src/content |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
proselint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Travis will automatically use
yarn
once it seesyarn.lock
file, we don't need to install it explicitly.