-
-
Notifications
You must be signed in to change notification settings - Fork 431
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
release event not available so use push event and filter (#893)
* release event not available so use push event and filter * use @master in place of @1.0.0 * check for a new tag last * Try using docker://zenika/alpine-chrome:with-node Need chrome to run tests * Can use yarn * Just run execution tests * Use node 10 docker image and run all tests * Comment tests until they are dockerised * Run execution tests again * Don't install pnpm globally * Use npx to run pnpm * Run Chrome no sandbox * More --no-sandbox * create own dockerfile with node / chrome headless * common karma.conf.js using ChromeHeadless --no-sandbox * no sandbox on command line * use alpine-chrome:with-node docker image * back to the version that works * drop node 6 from travis * try using node:10-slim * start building and running in docker * use full node image instead of slim for comparison tests * set GITHUB_WORKSPACE = "/github/workspace/ts-loader" * close to being able to run comparison tests in docker container * left a stray * tests pass in docker * can comparison tests pass in a GitHub Action? * comparison tests will not pass in github action * add docker:build step to package.json * Exclude npm publishing until https://github.com/actions/bin/issues/13 is fixed * Update main.workflow
- Loading branch information
1 parent
177a985
commit df04a56
Showing
32 changed files
with
390 additions
and
918 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.git | ||
.github | ||
.vscode | ||
.test | ||
node_modules | ||
examples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
workflow "build, test and publish on release" { | ||
on = "release" | ||
resolves = "publish" | ||
on = "push" | ||
# resolves = "publish" - commented until this issue is resolved: https://github.com/actions/bin/issues/13 | ||
resolves = "check for new tag" | ||
} | ||
|
||
# install with yarn | ||
|
@@ -21,15 +22,22 @@ action "build" { | |
# test with yarn | ||
action "test" { | ||
needs = "build" | ||
uses = "actions/[email protected]" | ||
uses = "./.github/node-chrome" | ||
runs = "yarn" | ||
args = "test" | ||
args = "execution-tests" | ||
} | ||
|
||
# publish with npm | ||
action "publish" { | ||
# filter for a new tag | ||
action "check for new tag" { | ||
needs = "test" | ||
uses = "actions/[email protected]" | ||
args = "publish" | ||
secrets = ["NPM_AUTH_TOKEN"] | ||
uses = "actions/bin/filter@master" | ||
args = "tag" | ||
} | ||
|
||
# publish with npm - commented until this issue is resolved: https://github.com/actions/bin/issues/13 | ||
#action "publish" { | ||
# needs = "check for new tag" | ||
# uses = "actions/[email protected]" | ||
# args = "publish" | ||
# secrets = ["NPM_AUTH_TOKEN"] | ||
#} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Taken from https://raw.githubusercontent.com/filipesilva/ng-github-actions/master/.github/node-chrome/Dockerfile | ||
# and https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#running-puppeteer-in-docker | ||
FROM node:10 | ||
|
||
# See https://crbug.com/795759 | ||
RUN apt-get update && apt-get install -yq libgconf-2-4 | ||
|
||
# Install latest chrome dev package and fonts to support major charsets (Chinese, Japanese, Arabic, Hebrew, Thai and a few others) | ||
# Note: this installs the necessary libs to make the bundled version of Chromium that Puppeteer | ||
# installs, work. | ||
RUN apt-get update && apt-get install -y wget --no-install-recommends \ | ||
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ | ||
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \ | ||
&& apt-get update \ | ||
&& apt-get install -y google-chrome-unstable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst ttf-freefont \ | ||
--no-install-recommends \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& apt-get purge --auto-remove -y curl \ | ||
&& rm -rf /src/*.deb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ addons: | |
chrome: stable | ||
language: node_js | ||
node_js: | ||
- "6" | ||
- "8" | ||
- "10" | ||
sudo: required | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
FROM node:10 | ||
|
||
# See https://crbug.com/795759 | ||
RUN apt-get update && apt-get install -yq libgconf-2-4 | ||
|
||
# Install latest chrome dev package and fonts to support major charsets (Chinese, Japanese, Arabic, Hebrew, Thai and a few others) | ||
# Note: this installs the necessary libs to make the bundled version of Chromium that Puppeteer | ||
# installs, work. | ||
RUN apt-get update && apt-get install -y wget --no-install-recommends \ | ||
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ | ||
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \ | ||
&& apt-get update \ | ||
&& apt-get install -y google-chrome-unstable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst ttf-freefont \ | ||
--no-install-recommends \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& apt-get purge --auto-remove -y curl \ | ||
&& rm -rf /src/*.deb | ||
|
||
WORKDIR /TypeStrong/ts-loader | ||
|
||
# install packages | ||
COPY package.json yarn.lock index.js /TypeStrong/ts-loader/ | ||
RUN yarn | ||
|
||
# build | ||
COPY src /TypeStrong/ts-loader/src | ||
RUN yarn build | ||
|
||
# test | ||
COPY test /TypeStrong/ts-loader/test | ||
|
||
# build and run tests with: | ||
# docker build -t ts-loader . | ||
# docker run -it ts-loader yarn test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 8 additions & 41 deletions
49
test/execution-tests/1.8.2_allowJs-entryFileIsJs/karma.conf.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,14 @@ | ||
/* eslint-disable no-var, strict */ | ||
'use strict'; | ||
var path = require('path'); | ||
var webpack = require('webpack'); | ||
var webpackConfig = require('./webpack.config.js'); | ||
var reporterOptions = require('../../reporterOptions'); | ||
var makeKarmaConfig = require('../../karmaConfig'); | ||
|
||
module.exports = function(config) { | ||
config.set({ | ||
browsers: [ 'ChromeHeadless' ], | ||
|
||
files: [ | ||
// This loads all the tests | ||
'./**/*.tests.js' | ||
], | ||
|
||
port: 9876, | ||
|
||
frameworks: [ 'jasmine' ], | ||
|
||
logLevel: config.LOG_INFO, //config.LOG_DEBUG | ||
|
||
preprocessors: { | ||
'./**/*.js': [ 'webpack', 'sourcemap' ] | ||
}, | ||
|
||
webpack: { | ||
devtool: 'inline-source-map', | ||
mode: webpackConfig.mode, | ||
module: webpackConfig.module, | ||
resolve: webpackConfig.resolve, | ||
|
||
// for test harness purposes only, you would not need this in a normal project | ||
resolveLoader: webpackConfig.resolveLoader | ||
}, | ||
|
||
webpackMiddleware: { | ||
quiet: true, | ||
stats: { | ||
colors: true | ||
} | ||
}, | ||
|
||
// reporter options | ||
mochaReporter: reporterOptions, | ||
}); | ||
config.set( | ||
makeKarmaConfig({ | ||
config, | ||
webpackConfig, | ||
files: ['./**/*.tests.js'] | ||
}) | ||
); | ||
}; |
52 changes: 11 additions & 41 deletions
52
test/execution-tests/1.8.2_babel-allowSyntheticDefaultImports/karma.conf.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,17 @@ | ||
/* eslint-disable no-var, strict */ | ||
'use strict'; | ||
var path = require('path'); | ||
var webpack = require('webpack'); | ||
var webpackConfig = require('./webpack.config.js'); | ||
var reporterOptions = require('../../reporterOptions'); | ||
var makeKarmaConfig = require('../../karmaConfig'); | ||
|
||
module.exports = function(config) { | ||
config.set({ | ||
browsers: [ 'ChromeHeadless' ], | ||
|
||
files: [ | ||
// This ensures we have the es6 shims in place from babel and then loads all the tests | ||
'main.js' | ||
], | ||
|
||
port: 9876, | ||
|
||
frameworks: [ 'jasmine' ], | ||
|
||
logLevel: config.LOG_INFO, //config.LOG_DEBUG | ||
|
||
preprocessors: { | ||
'main.js': [ 'webpack', 'sourcemap' ] | ||
}, | ||
|
||
webpack: { | ||
devtool: 'inline-source-map', | ||
mode: webpackConfig.mode, | ||
module: webpackConfig.module, | ||
resolve: webpackConfig.resolve, | ||
|
||
// for test harness purposes only, you would not need this in a normal project | ||
resolveLoader: webpackConfig.resolveLoader | ||
}, | ||
|
||
webpackMiddleware: { | ||
quiet: true, | ||
stats: { | ||
colors: true | ||
} | ||
}, | ||
|
||
// reporter options | ||
mochaReporter: reporterOptions, | ||
}); | ||
config.set( | ||
makeKarmaConfig({ | ||
config, | ||
webpackConfig, | ||
files: [ | ||
// This ensures we have the es6 shims in place from babel and then loads all the tests | ||
'main.js' | ||
] | ||
}) | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,17 @@ | ||
/* eslint-disable no-var, strict */ | ||
'use strict'; | ||
var path = require('path'); | ||
var webpack = require('webpack'); | ||
var webpackConfig = require('./webpack.config.js'); | ||
var reporterOptions = require('../../reporterOptions'); | ||
var makeKarmaConfig = require('../../karmaConfig'); | ||
|
||
module.exports = function(config) { | ||
config.set({ | ||
browsers: [ 'ChromeHeadless' ], | ||
|
||
files: [ | ||
// This loads all the tests | ||
'main.js' | ||
], | ||
|
||
port: 9876, | ||
|
||
frameworks: [ 'jasmine' ], | ||
|
||
logLevel: config.LOG_INFO, //config.LOG_DEBUG | ||
|
||
preprocessors: { | ||
'main.js': [ 'webpack', 'sourcemap' ] | ||
}, | ||
|
||
webpack: { | ||
devtool: 'inline-source-map', | ||
mode: webpackConfig.mode, | ||
module: webpackConfig.module, | ||
resolve: webpackConfig.resolve, | ||
|
||
// for test harness purposes only, you would not need this in a normal project | ||
resolveLoader: webpackConfig.resolveLoader | ||
}, | ||
|
||
webpackMiddleware: { | ||
quiet: true, | ||
stats: { | ||
colors: true | ||
} | ||
}, | ||
|
||
// reporter options | ||
mochaReporter: reporterOptions | ||
}); | ||
config.set( | ||
makeKarmaConfig({ | ||
config, | ||
webpackConfig, | ||
files: [ | ||
// This ensures we have the es6 shims in place from babel and then loads all the tests | ||
'main.js' | ||
] | ||
}) | ||
); | ||
}; |
51 changes: 11 additions & 40 deletions
51
test/execution-tests/2.1.4_babel-allowJsImportTypes/karma.conf.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,17 @@ | ||
/* eslint-disable no-var, strict */ | ||
'use strict'; | ||
var webpackConfig = require('./webpack.config.js'); | ||
var reporterOptions = require('../../reporterOptions'); | ||
var makeKarmaConfig = require('../../karmaConfig'); | ||
|
||
module.exports = function(config) { | ||
// Documentation: https://karma-runner.github.io/0.13/config/configuration-file.html | ||
config.set({ | ||
browsers: [ 'ChromeHeadless' ], | ||
|
||
files: [ | ||
// This ensures we have the es6 shims in place and then loads all the tests | ||
'main.js' | ||
], | ||
|
||
port: 9876, | ||
|
||
frameworks: [ 'jasmine' ], | ||
|
||
logLevel: config.LOG_INFO, //config.LOG_DEBUG | ||
|
||
preprocessors: { | ||
'main.js': [ 'webpack', 'sourcemap' ] | ||
}, | ||
|
||
webpack: { | ||
devtool: 'inline-source-map', | ||
mode: webpackConfig.mode, | ||
module: webpackConfig.module, | ||
resolve: webpackConfig.resolve, | ||
|
||
// for test harness purposes only, you would not need this in a normal project | ||
resolveLoader: webpackConfig.resolveLoader | ||
}, | ||
|
||
webpackMiddleware: { | ||
quiet: true, | ||
stats: { | ||
colors: true | ||
} | ||
}, | ||
|
||
// reporter options | ||
mochaReporter: reporterOptions | ||
}); | ||
config.set( | ||
makeKarmaConfig({ | ||
config, | ||
webpackConfig, | ||
files: [ | ||
// This ensures we have the es6 shims in place from babel and then loads all the tests | ||
'main.js' | ||
] | ||
}) | ||
); | ||
}; |
Oops, something went wrong.