diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..c87c95b --- /dev/null +++ b/.travis.yml @@ -0,0 +1,30 @@ +language: node_js +node_js: + - "8" +dist: trusty # needs Ubuntu Trusty +sudo: required +addons: + chrome: stable # have Travis install Chrome stable + +before_install: + - export DISPLAY=:99.0 + - sh -e /etc/init.d/xvfb start +install: npm install +before_script: + - npm start & + - wget --spider --timeout=15 --retry-connrefused http://localhost:9090 + - google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost & + - sleep 30 + - wget --spider --timeout=15 --retry-connrefused http://localhost:9222 + - find . | grep 'chrome-linux/chrome$' | xargs ldd + - sleep 30 +script: + - npm test + +deploy: + provider: pages + local-dir: dist + skip-cleanup: true + github-token: $GITHUB_TOKEN + on: + branch: master diff --git a/Gruntfile.js b/Gruntfile.js index 6de0cec..135f8ca 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -149,6 +149,7 @@ module.exports = function (grunt) { 'dist/spid-button.min.js' // Modulo minifizzato da testare ], options: { + noSandbox: true, specs: ['src/test/agid-*.js'], outfile: '_SpecRunner.html', keepRunner: true, diff --git a/package.json b/package.json index 3df1e5a..38c36e7 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "build-watch": "grunt watch:build", "lint": "grunt lint", "test-watch": "grunt watch:test", - "test": "grunt test", + "test": "grunt test --verbose", "performance": "lighthouse $npm_package_localserver_url$npm_package_localserver_port/index.html --output-path=reports/lighthouse.html --view", "precommit": "npm run lint", "prepush": "npm test",