From 0c86c225d7f357eadd48f8970c6fb1d1a2d38f26 Mon Sep 17 00:00:00 2001 From: Nick Shine Date: Fri, 19 Apr 2019 00:54:11 -0500 Subject: [PATCH] ci: enable ci specific chrome settings --- .circleci/config.yml | 2 +- gruntfile.js | 35 ++++++++++++++++++++--------------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4da0bac1d18..f37de01a08b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,7 +11,7 @@ jobs: - dependency-cache-{{ checksum "package.json" }} - dependency-cache- - run: npm install - - run: npm run build + - run: npm run build -- --ci=$CI - save_cache: key: dependency-cache-{{ checksum "package.json" }} paths: diff --git a/gruntfile.js b/gruntfile.js index 3abe4320b54..f1bd4f33799 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -9,6 +9,25 @@ module.exports = grunt => { if (!Array.isArray(root)) root = [root]; + const isCI = grunt.option('ci') || false; + + const qunit = { + files: [ 'test/*.html' ], + }; + + if (isCI) { + qunit.options = { + puppeteer: { + headless: true, + executablePath: '/usr/bin/google-chrome', + args: [ + '--no-snadbox', + '--disable-setuid-sandbox', + ] + } + }; + } + // Project configuration grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), @@ -22,21 +41,7 @@ module.exports = grunt => { ' * Copyright (C) 2019 Hakim El Hattab, http://hakim.se\n' + ' */' }, - - qunit: { - files: [ 'test/*.html' ], - options: { - puppeteer: { - headless: true, - executablePath: '/usr/bin/google-chrome', - args: [ - '--no-snadbox', - '--disable-setuid-sandbox', - ] - } - } - }, - + qunit, uglify: { options: { banner: '<%= meta.banner %>\n',