Skip to content

Commit

Permalink
Added testci branch for testing ci without updating README.md reporti…
Browse files Browse the repository at this point in the history
…ng. Bumped numerous dependencies.
  • Loading branch information
Matthew Mulholland committed Oct 16, 2018
2 parents fe8b86e + d796108 commit d551ef5
Show file tree
Hide file tree
Showing 129 changed files with 2,070 additions and 39,950 deletions.
1 change: 1 addition & 0 deletions .electron-vue/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ function build () {

function pack (config) {
return new Promise((resolve, reject) => {
config.mode = 'production'
webpack(config, (err, stats) => {
if (err) reject(err.stack || err)
else if (stats.hasErrors()) {
Expand Down
2 changes: 0 additions & 2 deletions .electron-vue/dev-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ const hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true

hotClient.subscribe(event => {
/**
* Reload browser when HTMLWebpackPlugin emits a new index.html
*/
if (event.action === 'reload') {
window.location.reload()
}
Expand Down
12 changes: 6 additions & 6 deletions .electron-vue/dev-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,21 @@ function logStats (proc, data) {
function startRenderer () {
return new Promise((resolve, reject) => {
rendererConfig.entry.renderer = [path.join(__dirname, 'dev-client')].concat(rendererConfig.entry.renderer)

rendererConfig.mode = 'development'
const compiler = webpack(rendererConfig)
hotMiddleware = webpackHotMiddleware(compiler, {
log: false,
heartbeat: 2500
})

compiler.plugin('compilation', compilation => {
compilation.plugin('html-webpack-plugin-after-emit', (data, cb) => {
compiler.hooks.compilation.tap('compilation', compilation => {
compilation.hooks.htmlWebpackPluginAfterEmit.tapAsync('html-webpack-plugin-after-emit', (data, cb) => {
hotMiddleware.publish({ action: 'reload' })
cb()
})
})

compiler.plugin('done', stats => {
compiler.hooks.done.tap('done', stats => {
logStats('Renderer', stats)
})

Expand All @@ -80,10 +80,10 @@ function startRenderer () {
function startMain () {
return new Promise((resolve, reject) => {
mainConfig.entry.main = [path.join(__dirname, '../src/main/index.dev.js')].concat(mainConfig.entry.main)

mainConfig.mode = 'development'
const compiler = webpack(mainConfig)

compiler.plugin('watch-run', (compilation, done) => {
compiler.hooks.watchRun.tapAsync('watch-run', (compilation, done) => {
logStats('Main', chalk.white.bold('compiling...'))
hotMiddleware.publish({ action: 'compiling' })
done()
Expand Down
6 changes: 2 additions & 4 deletions .electron-vue/webpack.main.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
'use strict'

process.env.BABEL_ENV = 'main'

// process.traceDeprecation = true
const path = require('path')
const {dependencies} = require('../package.json')
const webpack = require('webpack')

const BabiliWebpackPlugin = require('babili-webpack-plugin')
const FixDefaultImportPlugin = require('webpack-fix-default-import-plugin')

let mainConfig = {
entry: {
Expand Down Expand Up @@ -55,8 +54,7 @@ let mainConfig = {
]
},
plugins: [
new webpack.NoEmitOnErrorsPlugin(),
new FixDefaultImportPlugin()
new webpack.NoEmitOnErrorsPlugin()
],
target: 'electron-main'
}
Expand Down
72 changes: 55 additions & 17 deletions .electron-vue/webpack.renderer.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
'use strict'

process.env.BABEL_ENV = 'renderer'

// process.traceDeprecation = true
const path = require('path')
const { dependencies } = require('../package.json')
const {dependencies} = require('../package.json')
const webpack = require('webpack')

const BabiliWebpackPlugin = require('babili-webpack-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
var FixDefaultImportPlugin = require('webpack-fix-default-import-plugin')
const {VueLoaderPlugin} = require('vue-loader')

/**
* List of node_modules to include in webpack bundle
Expand All @@ -20,7 +20,7 @@ var FixDefaultImportPlugin = require('webpack-fix-default-import-plugin')
* https://simulatedgreg.gitbooks.io/electron-vue/content/en/webpack-configurations.html#white-listing-externals
*/
let whiteListedModules = ['vue']
const defaultMinify = {
const defaultMinify = {
collapseWhitespace: true,
removeAttributeQuotes: true,
removeComments: true
Expand All @@ -38,6 +38,31 @@ let rendererConfig = {
externals: [
...Object.keys(dependencies || {}).filter(d => !whiteListedModules.includes(d))
],
optimization: !process.env.KARMA ? {
minimize: false,
runtimeChunk: {
name: 'vendor'
},
splitChunks: {
cacheGroups: {
default: false,
commons: {
test: /node_modules/,
name: "vendor",
chunks: "initial",
minSize: 1
},
styles: {
name: 'styles',
test: /\.s?css$/,
chunks: 'initial',
minChunks: 1,
reuseExistingChunk: true,
enforce: true,
},
}
}
} : {},
module: {
rules: [
{
Expand All @@ -53,10 +78,20 @@ let rendererConfig = {
},
{
test: /\.css$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: 'css-loader'
})
use: [
// MiniCssExtractPlugin.loader,
'vue-style-loader',
'css-loader'
]
},
{
test: /\.styl(us)?$/,
use: [
// MiniCssExtractPlugin.loader,
'vue-style-loader',
'css-loader',
'stylus-loader'
]
},
{
test: /\.html$/,
Expand All @@ -81,6 +116,7 @@ let rendererConfig = {
sass: 'vue-style-loader!css-loader!sass-loader?indentedSyntax=1',
scss: 'vue-style-loader!css-loader!sass-loader',
styl: 'vue-style-loader!css-loader!stylus-loader'
// styl: 'MiniCssExtractPlugin.loader!css-loader!stylus-loader'
}
}
}
Expand All @@ -89,7 +125,7 @@ let rendererConfig = {
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
use: {
loader: 'url-loader',
query: {
options: {
limit: 10000,
name: 'imgs/[name]--[folder].[ext]'
}
Expand All @@ -107,7 +143,7 @@ let rendererConfig = {
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
use: {
loader: 'url-loader',
query: {
options: {
limit: 10000,
name: 'fonts/[name]--[folder].[ext]'
}
Expand All @@ -120,15 +156,15 @@ let rendererConfig = {
__filename: process.env.NODE_ENV !== 'production'
},
plugins: [
new ExtractTextPlugin('styles.css'),
new VueLoaderPlugin(),
new MiniCssExtractPlugin({filename: 'styles.css'}),
createHtmlPlugin('index'),
createHtmlPlugin('keyboardhelp'),
createHtmlPlugin('urldialog'),
createHtmlPlugin('openexcel'),
createHtmlPlugin('errors'),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoEmitOnErrorsPlugin(),
new FixDefaultImportPlugin()
new webpack.NoEmitOnErrorsPlugin()
],
output: {
filename: '[name].js',
Expand All @@ -141,7 +177,7 @@ let rendererConfig = {
'vue$': 'vue/dist/vue.esm.js',
'static': path.resolve(__dirname, '../static')
},
extensions: ['.js', '.vue', '.json', '.css', '.node']
extensions: ['.js', '.vue', '.json', '.css', '.node', '.styl']
},
target: 'electron-renderer'
}
Expand All @@ -154,10 +190,11 @@ function createHtmlPlugin(pageName) {
nodeModules: defaultNodeModules
})
}

/**
* Adjust rendererConfig for development settings
*/
if (process.env.NODE_ENV !== 'production') {
if (process.env.NODE_ENV !== 'production' || process.env.KARMA) {
rendererConfig.plugins.push(
new webpack.DefinePlugin({
'__static': `"${path.join(__dirname, '../static').replace(/\\/g, '\\\\')}"`
Expand All @@ -168,7 +205,7 @@ if (process.env.NODE_ENV !== 'production') {
/**
* Adjust rendererConfig for production settings
*/
if (process.env.NODE_ENV === 'production') {
if (process.env.NODE_ENV === 'production' && !process.env.KARMA) {
rendererConfig.devtool = ''

rendererConfig.plugins.push(
Expand All @@ -187,6 +224,7 @@ if (process.env.NODE_ENV === 'production') {
minimize: true
})
)
rendererConfig.optimization.minimize = true
}

module.exports = rendererConfig
2 changes: 0 additions & 2 deletions .electron-vue/webpack.test.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const webpack = require('webpack')
const WebpackShellPlugin = require('webpack-shell-plugin')

const BabiliWebpackPlugin = require('babili-webpack-plugin')
const FixDefaultImportPlugin = require('webpack-fix-default-import-plugin')

let mainTestConfig = {
externals: [nodeExternals()],
Expand Down Expand Up @@ -48,7 +47,6 @@ let mainTestConfig = {
},
plugins: [
new webpack.NoEmitOnErrorsPlugin(),
new FixDefaultImportPlugin(),
],
target: 'electron'
}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ yarn-error.log
!help-tags.csv
.nyc_output/
webdriver.log/
coverage/
test/unit/coverage/
32 changes: 32 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,44 @@ install:
- source ~/.bashrc
- yarn
stages:
<<<<<<< HEAD
- unittest
=======
- lint
- unittest
- unittestandcoverage
>>>>>>> testci
- test
- build
jobs:
include:
<<<<<<< HEAD
- name: unittest
if: branch = ci
script:
- yarn run unit
- yarn run unit:coverage
- name: test
if: branch = ci
=======
- name: lint
if: branch IN (master, ci, testci)
script:
- yarn run lint
- name: unittest
if: branch IN (master)
script:
- yarn run clean
- yarn run unit
- name: unittestandcoverage
if: branch IN (ci, testci)
script:
- yarn run clean
- yarn run unit
- yarn run unit:coverage
- name: test
if: branch IN (ci, testci)
>>>>>>> testci
script: ./travis_script.sh test/features/backlog
- script: ./travis_script.sh test/features/data_curator
- script: ./travis_script.sh test/features/edit
Expand All @@ -38,12 +64,18 @@ jobs:
- script: ./travis_script.sh test/features/tools
- script: ./travis_script.sh test/features/window
- name: build
<<<<<<< HEAD
if: branch != ci
=======
if: branch NOT IN (master, ci, testci)
>>>>>>> testci
script: yarn run release:predraft
branches:
only:
- "/^v\\d+\\.\\d+(\\.\\d+)?(-\\S*)?$/"
- ci
- testci
- master
env:
global:
secure: F+Bn6BrNKTTybkEs4UwCl7961z7ura2zBeuw+tS/vXqswb//x9DEhEr5IJ53VyC+H2R3Wj8yJ121514FiJwNg4hUpUQ98DHyczbMLXrg+wjQI2ZYvhiAonR5LzDGNd/XLhSDezQK556+guq67SnGPP3iqnfjyu8XJ2IaynLukvLSazZTCliuqpEpwaCn99+xhaHLcGRF/Dh2Gg5+HVfQnC4S6eiYGo5Dm9RDG0hntxYHUOAxQYmnvXxf7uLNc0sfFSoVd1BZytZCVFLceY5DM0tOO8kRyMQk+LJqneAdhp9Z8pUMcTMDeJtNegqqSaBra8UAkrGv1tUrBYUQnq4fkbH0tees6mJNFkqNlOW67pj8zghYSAKwNXiazFmH/lYE2sleBKGflznLZPDD5XXLlQ/aKXF+3wAx0wMtiGkFBbGP+GoBg10+7RgKw0A+mpLaJAVwUYGGJSEfH3A0U0OEt7XRdk/sD4nFKLzL3SAx3QC57FdGu4VWdJJT9t54oX+NzM3QmBH3dNxmge4XFLR1iwN72yheB2HyGu5zafKdOfbvCz2fP1ddECm2KWu8I7NNuBIwoBUm3tVm60b3gTpblAO3RcIrLg3k+ACTSvxJuzqSIE2/YnXGnjfVPW/NaCcyD1cPFppTvmpjLNHRfwP9zeP4nBOHHgOv7grzmvCs6QY=
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@

[![GitHub package version](https://img.shields.io/github/package-json/v/ODIQueensland/data-curator.svg)](https://github.com/ODIQueensland/data-curator/releases)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)
<<<<<<< HEAD
[![Travis Build Status](https://travis-ci.org/ODIQueensland/data-curator.svg)](https://travis-ci.org/ODIQueensland/data-curator)
[![Appveyor Build status](https://ci.appveyor.com/api/projects/status/fahwo5shvb6jl9ux/?svg=true)](https://ci.appveyor.com/project/ODIQueensland/data-curator)
[![Github All Releases](https://img.shields.io/github/downloads/ODIQueensland/data-curator/total.svg)](https://github.com/ODIQueensland/data-curator/releases)
[![Appveyor Acceptance Test status](https://img.shields.io/badge/acceptance%20tests-✔passed:%2034%20%20❌failed:%200%20%20❗undefined:%20199-orange.svg)](https://ci.appveyor.com/project/ODIQueensland/data-curator)
[![Unit Test Coverage Status](https://coveralls.io/repos/github/ODIQueensland/data-curator/badge.svg?branch=ci)](https://coveralls.io/github/ODIQueensland/data-curator?branch=ci)
=======
[![Travis Build Status](https://travis-ci.org/ODIQueensland/data-curator.svg?branch=ci)](https://travis-ci.org/ODIQueensland/data-curator)
[![Appveyor Build status](https://ci.appveyor.com/api/projects/status/fahwo5shvb6jl9ux/branch/ci?svg=true)](https://ci.appveyor.com/project/ODIQueensland/data-curator)
[![Appveyor Acceptance Test status](https://img.shields.io/badge/acceptance%20tests-✔passed:%2034%20%20❌failed:%200%20%20❗undefined:%20199-orange.svg)](https://ci.appveyor.com/project/ODIQueensland/data-curator)
[![Unit Test Coverage Status](https://coveralls.io/repos/github/ODIQueensland/data-curator/badge.svg?branch=ci)](https://coveralls.io/github/ODIQueensland/data-curator?branch=ci)
[![Github All Releases](https://img.shields.io/github/downloads/ODIQueensland/data-curator/total.svg)](https://github.com/ODIQueensland/data-curator/releases)
[![Github Releases](https://img.shields.io/github/downloads/ODIQueensland/data-curator/latest/total.svg?label=Latest%20version%20downloads)](https://github.com/ODIQueensland/data-curator/releases/latest)
>>>>>>> testci

:sparkles: [Download Data Curator](https://github.com/ODIQueensland/data-curator/releases/latest) for Windows or macOS. :sparkles:
Expand Down
Loading

0 comments on commit d551ef5

Please sign in to comment.