Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Commit

Permalink
feat(.travis.yml): run scripts on the same job
Browse files Browse the repository at this point in the history
  • Loading branch information
ikatyang committed Jul 9, 2017
1 parent d25c9e6 commit eeb4ac7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 36 deletions.
15 changes: 3 additions & 12 deletions src/templates/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,12 @@ node_js:
before_install:
- yarn global add codecov

env:
- JOB=test

script:
- if [ "$JOB" = "lint" ]; then yarn run lint; fi
- if [ "$JOB" = "test" ]; then yarn run test -- --verbose; fi
- if [ "$JOB" = "test-coverage" ]; then yarn run test -- --verbose --coverage; fi
- yarn run lint
- yarn run test -- --coverage --verbose

after_script:
- if [ "$JOB" = "test-coverage" ]; then codecov; fi
- codecov

cache:
yarn: true
Expand All @@ -24,8 +20,3 @@ cache:

matrix:
fast_finish: true
include:
- node_js: "stable"
env: JOB=lint
- node_js: "stable"
env: JOB=test-coverage
30 changes: 6 additions & 24 deletions tests/__snapshots__/general.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,12 @@ node_js:
before_install:
- yarn global add codecov
env:
- JOB=test
script:
- if [ \\"$JOB\\" = \\"lint\\" ]; then yarn run lint; fi
- if [ \\"$JOB\\" = \\"test\\" ]; then yarn run test -- --verbose; fi
- if [ \\"$JOB\\" = \\"test-coverage\\" ]; then yarn run test -- --verbose --coverage; fi
- yarn run lint
- yarn run test -- --coverage --verbose
after_script:
- if [ \\"$JOB\\" = \\"test-coverage\\" ]; then codecov; fi
- codecov
cache:
yarn: true
Expand All @@ -55,11 +51,6 @@ cache:
matrix:
fast_finish: true
include:
- node_js: \\"stable\\"
env: JOB=lint
- node_js: \\"stable\\"
env: JOB=test-coverage
"
`;

Expand Down Expand Up @@ -233,16 +224,12 @@ node_js:
before_install:
- yarn global add codecov
env:
- JOB=test
script:
- if [ \\"$JOB\\" = \\"lint\\" ]; then yarn run lint; fi
- if [ \\"$JOB\\" = \\"test\\" ]; then yarn run test -- --verbose; fi
- if [ \\"$JOB\\" = \\"test-coverage\\" ]; then yarn run test -- --verbose --coverage; fi
- yarn run lint
- yarn run test -- --coverage --verbose
after_script:
- if [ \\"$JOB\\" = \\"test-coverage\\" ]; then codecov; fi
- codecov
cache:
yarn: true
Expand All @@ -251,11 +238,6 @@ cache:
matrix:
fast_finish: true
include:
- node_js: \\"stable\\"
env: JOB=lint
- node_js: \\"stable\\"
env: JOB=test-coverage
"
`;

Expand Down

0 comments on commit eeb4ac7

Please sign in to comment.