Skip to content

Commit

Permalink
Split travis builds into jobs (#4586)
Browse files Browse the repository at this point in the history
* Split travis builds into jobs

* Fix gulpfile syntax

* Make frontend tests faster by not using gulp

* Remove XO spec files ignore
  • Loading branch information
sharkykh authored and OmgImAlexis committed Jul 5, 2018
1 parent 2ed76da commit b918362
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 28 deletions.
65 changes: 44 additions & 21 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,54 @@
language: python
python:
- 2.7.10
sudo: false
before_install:
- python .github/check_version.py
install:
- pip install --upgrade pip
- pip install --upgrade tox
- pip install dredd_hooks
- pip install 'PyYAML<4'
- pip install six
- nvm install v10.1.0
- nvm use v10.1.0
- 'curl -o- -L https://yarnpkg.com/install.sh | bash'
- 'export PATH="$HOME/.yarn/bin:$PATH" && yarn install --ignore-scripts'
script:
- yarn build && yarn test-css
- cd themes-default/slim && yarn test && yarn coverage && cd ../../
- yarn test-api
- tox -v --recreate
cache:
yarn: true
directories:
- $HOME/.cache/pip
- node_modules
after_failure:
- cat ./dredd/data/Logs/application.log
before_install:
- python .github/check_version.py
install: false
script: false
jobs:
include:
# test stage + frontend tests start here
- stage: test
env:
- test_type=frontend
language: node_js
node_js: 10.1.0
install:
- 'curl -o- -L https://yarnpkg.com/install.sh | bash'
- 'export PATH="$HOME/.yarn/bin:$PATH" && yarn install --ignore-scripts'
script:
- yarn test-css
- >-
cd themes-default/slim &&
yarn install --ignore-scripts &&
yarn xo &&
yarn test &&
yarn coverage &&
cd ../../
# backend tests start here
- env:
- test_type=backend
python:
- 2.7.10
install:
- pip install --upgrade pip
- pip install --upgrade tox
# install everything needed for `yarn test-api`
- pip install dredd_hooks
- pip install 'PyYAML<4'
- pip install six
- nvm install v10.1.0
- 'curl -o- -L https://yarnpkg.com/install.sh | bash'
- 'export PATH="$HOME/.yarn/bin:$PATH" && yarn install --ignore-scripts'
script:
- yarn test-api
- tox -v --recreate
after_failure:
- cat ./dredd/data/Logs/application.log
notifications:
slack:
secure: >-
Expand Down
8 changes: 4 additions & 4 deletions themes-default/slim/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ gulp.task('build', done => {
// Whe're building the light and dark theme. For this we need to run two sequences.
// If we need a yargs parameter name csstheme.
setCsstheme();
runSequence('lint', 'css', 'cssTheme', 'img', 'js', 'static', 'templates', 'root', async() => {
runSequence('lint', 'css', 'cssTheme', 'img', 'js', 'static', 'templates', 'root', () => {
if (!PROD) {
done();
}
Expand All @@ -303,11 +303,11 @@ const syncTheme = (theme, sequence) => {
*
* Do not run the xo build, as this takes a lot of time.
*/
gulp.task('sync', async() => {
gulp.task('sync', () => {
// Whe're building the light and dark theme. For this we need to run two sequences.
// If we need a yargs parameter name csstheme.
for (let theme of Object.entries(config.cssThemes)) {
await syncTheme(theme, ['css', 'cssTheme', 'img', 'js', 'static', 'templates', 'root']);
for (const theme of Object.entries(config.cssThemes)) {
syncTheme(theme, ['css', 'cssTheme', 'img', 'js', 'static', 'templates', 'root']);
}
});

Expand Down
1 change: 0 additions & 1 deletion themes-default/slim/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@
"static/js/lib/**",
"static/js/*.min.js",
"static/js/vender.js",
"/**/*.spec.js",
"build/**"
],
"esnext": true
Expand Down
1 change: 0 additions & 1 deletion themes/dark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@
"static/js/lib/**",
"static/js/*.min.js",
"static/js/vender.js",
"/**/*.spec.js",
"build/**"
],
"esnext": true
Expand Down
1 change: 0 additions & 1 deletion themes/light/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@
"static/js/lib/**",
"static/js/*.min.js",
"static/js/vender.js",
"/**/*.spec.js",
"build/**"
],
"esnext": true
Expand Down

0 comments on commit b918362

Please sign in to comment.