aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-10-31 17:23:57 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-10-31 17:23:57 +0100
commit18530063feb3326369bf3871248b04de0ce4d2af (patch)
tree1b40e2cdb9d322eb34765642c161aca4edcd4a74
parent7a8032bb6d1d2fdfce9b23af13c3ed1cdfac91e9 (diff)
downloadPeerTube-18530063feb3326369bf3871248b04de0ce4d2af.tar.gz
PeerTube-18530063feb3326369bf3871248b04de0ce4d2af.tar.zst
PeerTube-18530063feb3326369bf3871248b04de0ce4d2af.zip
Try matrix to speed up travis builds
-rw-r--r--.travis.yml11
-rw-r--r--client/config/webpack.prod.js2
-rw-r--r--client/package.json2
-rw-r--r--package.json3
-rwxr-xr-xscripts/build/client.sh4
-rwxr-xr-xscripts/test.sh12
-rwxr-xr-xscripts/travis.sh23
7 files changed, 44 insertions, 13 deletions
diff --git a/.travis.yml b/.travis.yml
index 7b8935a32..1b611b402 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -22,7 +22,6 @@ services:
22 - postgresql 22 - postgresql
23 23
24before_script: 24before_script:
25 - npm run build
26 - wget --no-check-certificate "https://download.cpy.re/ffmpeg/ffmpeg-release-3.0.2-64bit-static.tar.xz" 25 - wget --no-check-certificate "https://download.cpy.re/ffmpeg/ffmpeg-release-3.0.2-64bit-static.tar.xz"
27 - tar xf ffmpeg-release-3.0.2-64bit-static.tar.xz 26 - tar xf ffmpeg-release-3.0.2-64bit-static.tar.xz
28 - mkdir -p $HOME/bin 27 - mkdir -p $HOME/bin
@@ -37,6 +36,16 @@ before_script:
37 - psql -c 'create database peertube_test6;' -U postgres 36 - psql -c 'create database peertube_test6;' -U postgres
38 - psql -c "create user peertube with password 'peertube';" -U postgres 37 - psql -c "create user peertube with password 'peertube';" -U postgres
39 38
39matrix:
40 include:
41 - env: TEST_SUITE=build_then_client
42 - env: TEST_SUITE=api
43 - env: TEST_SUITE=cli
44 - env: TEST_SUITE=lint
45
46script:
47 - npm run travis -- "$TEST_SUITE"
48
40after_failure: 49after_failure:
41 - cat test1/logs/all-logs.log 50 - cat test1/logs/all-logs.log
42 - cat test2/logs/all-logs.log 51 - cat test2/logs/all-logs.log
diff --git a/client/config/webpack.prod.js b/client/config/webpack.prod.js
index ecd7914c7..539b9a1ee 100644
--- a/client/config/webpack.prod.js
+++ b/client/config/webpack.prod.js
@@ -167,7 +167,7 @@ module.exports = function (env) {
167 beautify: false 167 beautify: false
168 } 168 }
169 }, 169 },
170 warnings: true 170 warningsFilter: () => false
171 }), 171 }),
172 172
173 /** 173 /**
diff --git a/client/package.json b/client/package.json
index 1715416cf..39b3185cc 100644
--- a/client/package.json
+++ b/client/package.json
@@ -13,7 +13,7 @@
13 "url": "git://github.com/Chocobozzz/PeerTube.git" 13 "url": "git://github.com/Chocobozzz/PeerTube.git"
14 }, 14 },
15 "scripts": { 15 "scripts": {
16 "test": "standard && tslint --type-check --project ./tsconfig.json -c ./tslint.json 'src/app/**/*.ts'", 16 "lint": "standard && tslint --type-check --project ./tsconfig.json -c ./tslint.json 'src/app/**/*.ts'",
17 "webpack": "webpack", 17 "webpack": "webpack",
18 "webpack-dev-server": "webpack-dev-server", 18 "webpack-dev-server": "webpack-dev-server",
19 "postinstall": "npm rebuild node-sass" 19 "postinstall": "npm rebuild node-sass"
diff --git a/package.json b/package.json
index ef044ab16..fd878a342 100644
--- a/package.json
+++ b/package.json
@@ -44,7 +44,8 @@
44 "tsc": "tsc", 44 "tsc": "tsc",
45 "nodemon": "nodemon", 45 "nodemon": "nodemon",
46 "ts-node": "ts-node", 46 "ts-node": "ts-node",
47 "tslint": "tslint" 47 "tslint": "tslint",
48 "travis": "scripty"
48 }, 49 },
49 "dependencies": { 50 "dependencies": {
50 "async": "^2.0.0", 51 "async": "^2.0.0",
diff --git a/scripts/build/client.sh b/scripts/build/client.sh
index 65b67edcf..3a1532daf 100755
--- a/scripts/build/client.sh
+++ b/scripts/build/client.sh
@@ -1,7 +1,7 @@
1#!/usr/bin/env sh 1#!/bin/bash
2 2
3cd client || exit -1 3cd client || exit -1
4 4
5rm -rf ./compiled 5rm -rf ./compiled ./dist
6 6
7npm run webpack -- --config config/webpack.prod.js --progress --profile --bail 7npm run webpack -- --config config/webpack.prod.js --progress --profile --bail
diff --git a/scripts/test.sh b/scripts/test.sh
index dc1baf97d..473445876 100755
--- a/scripts/test.sh
+++ b/scripts/test.sh
@@ -1,10 +1,8 @@
1#!/bin/bash 1#!/bin/bash
2 2
3npm run build:server 3npm run build:server || exit -1
4 4
5cd client || exit -1 5npm run travis -- client || exit -1
6npm test || exit -1 6npm run travis -- api || exit -1
7 7npm run travis -- cli || exit -1
8cd .. || exit -1 8npm run travis -- lint || exit -1
9npm run tslint -- --type-check --project ./tsconfig.json -c ./tslint.json server.ts "server/**/*.ts" || exit -1
10mocha --exit --require ts-node/register --bail server/tests/index.ts
diff --git a/scripts/travis.sh b/scripts/travis.sh
new file mode 100755
index 000000000..e919f18a4
--- /dev/null
+++ b/scripts/travis.sh
@@ -0,0 +1,23 @@
1#!/bin/bash
2
3if [ $# -eq 0 ]; then
4 echo "Need test suite argument."
5 exit -1
6fi
7
8if [ "$1" = "build_then_client" ]; then
9 npm run build
10 mocha --exit --require ts-node/register --bail server/tests/client.ts
11elif [ "$1" = "client" ]; then
12 mocha --exit --require ts-node/register --bail server/tests/client.ts
13elif [ "$1" = "api" ]; then
14 mocha --exit --require ts-node/register --bail server/tests/api/index.ts
15elif [ "$1" = "cli" ]; then
16 mocha --exit --require ts-node/register --bail server/tests/cli/index.ts
17elif [ "$1" = "lint" ]; then
18 cd client || exit -1
19 npm run lint || exit -1
20
21 cd .. || exit -1
22 npm run tslint -- --type-check --project ./tsconfig.json -c ./tslint.json server.ts "server/**/*.ts" || exit -1
23fi