Skip to content

Commit

Permalink
ci: [Bug] Web based karma tests are no longer running #1135 (#1137)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
Co-authored-by: Valentin Marchaud <contact@vmarchaud.fr>
  • Loading branch information
3 people authored Sep 10, 2022
1 parent 4e4d22e commit 954f29c
Show file tree
Hide file tree
Showing 19 changed files with 72 additions and 239 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,4 @@ package.json.lerna_backup

# version.ts file is automatically generated at compile time
version.ts
/.vs
2 changes: 1 addition & 1 deletion karma.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {
listenAddress: 'localhost',
hostname: 'localhost',
browsers: ['ChromeHeadless'],
frameworks: ['mocha', 'webpack'],
frameworks: ['mocha'],
coverageIstanbulReporter: {
reports: ['json'],
dir: '.nyc_output',
Expand Down
2 changes: 1 addition & 1 deletion karma.webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const webpackNodePolyfills = require('./webpack.node-polyfills.js');
module.exports = {
mode: 'development',
target: 'web',
name: 'bundle',
output: { filename: 'bundle.js' },
resolve: { extensions: ['.ts', '.js', '.tsx'] },
devtool: 'inline-source-map',
module: {
Expand Down
21 changes: 1 addition & 20 deletions metapackages/auto-instrumentations-web/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Copyright The OpenTelemetry Authors
* Copyright 2020, OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,29 +14,10 @@
* limitations under the License.
*/

const webpack = require('webpack');

const karmaWebpackConfig = require('../../karma.webpack');
const karmaBaseConfig = require('../../karma.base');

module.exports = (config) => {
{
const plugins = karmaWebpackConfig.plugins = [];
plugins.push(new webpack.ProvidePlugin({
process: 'process/browser',
}));
}

{
const plugins = karmaBaseConfig.plugins = [];
const toAdd = Object.keys(require('./package.json').devDependencies)
.filter((packageName) => packageName.startsWith('karma-'))
.map((packageName) => require(packageName));
plugins.push(
...toAdd
);
}

config.set(Object.assign({}, karmaBaseConfig, {
webpack: karmaWebpackConfig
}))
Expand Down
17 changes: 7 additions & 10 deletions metapackages/auto-instrumentations-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,32 +34,29 @@
},
"devDependencies": {
"@babel/core": "7.15.0",
"@jsdevtools/coverage-istanbul-loader": "3.0.5",
"@opentelemetry/api": "^1.0.0",
"@types/mocha": "8.2.3",
"@types/node": "16.11.21",
"@types/sinon": "10.0.2",
"@types/webpack-env": "1.16.2",
"assert": "2.0.0",
"babel-loader": "8.2.2",
"gts": "3.1.0",
"karma": "6.3.17",
"karma-chrome-launcher": "3.1.1",
"@jsdevtools/coverage-istanbul-loader": "3.0.5",
"karma": "6.3.16",
"karma-chrome-launcher": "3.1.0",
"karma-coverage-istanbul-reporter": "3.0.3",
"karma-mocha": "2.0.1",
"karma-spec-reporter": "0.0.33",
"karma-webpack": "5.0.0",
"karma-spec-reporter": "0.0.32",
"karma-webpack": "4.0.2",
"mocha": "7.2.0",
"nyc": "15.1.0",
"process": "0.11.10",
"rimraf": "3.0.2",
"sinon": "14.0.0",
"ts-loader": "8.3.0",
"ts-mocha": "10.0.0",
"typescript": "4.3.5",
"util": "0.12.4",
"webpack": "5.72.0",
"webpack-cli": "4.9.2",
"webpack": "4.46.0",
"webpack-cli": "4.7.2",
"webpack-merge": "5.8.0"
},
"dependencies": {
Expand Down
29 changes: 6 additions & 23 deletions packages/opentelemetry-id-generator-aws-xray/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,13 @@
* limitations under the License.
*/

const webpack = require('webpack');

const karmaWebpackConfig = require('../../karma.webpack');
const karmaBaseConfig = require('../../karma.base');

module.exports = (config) => {
{
const plugins = karmaWebpackConfig.plugins = [];
plugins.push(new webpack.ProvidePlugin({
process: 'process/browser',
}));
}

{
const plugins = karmaBaseConfig.plugins = [];
const toAdd = Object.keys(require('./package.json').devDependencies)
.filter((packageName) => packageName.startsWith('karma-'))
.map((packageName) => require(packageName));
plugins.push(
...toAdd
);
}

config.set(Object.assign({}, karmaBaseConfig, {
webpack: karmaWebpackConfig
}))
module.exports = config => {
config.set(
Object.assign({}, karmaBaseConfig, {
webpack: karmaWebpackConfig,
})
);
};
14 changes: 6 additions & 8 deletions packages/opentelemetry-id-generator-aws-xray/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,29 +54,27 @@
"@opentelemetry/api": "^1.0.0"
},
"devDependencies": {
"@jsdevtools/coverage-istanbul-loader": "3.0.5",
"@opentelemetry/api": "^1.0.0",
"@types/mocha": "8.2.3",
"@types/node": "16.11.21",
"@types/sinon": "10.0.2",
"@types/webpack-env": "1.16.2",
"assert": "2.0.0",
"gts": "3.1.0",
"karma": "6.3.17",
"karma-chrome-launcher": "3.1.1",
"@jsdevtools/coverage-istanbul-loader": "3.0.5",
"karma": "6.3.16",
"karma-chrome-launcher": "3.1.0",
"karma-coverage-istanbul-reporter": "3.0.3",
"karma-mocha": "2.0.1",
"karma-spec-reporter": "0.0.33",
"karma-webpack": "5.0.0",
"karma-spec-reporter": "0.0.32",
"karma-webpack": "4.0.2",
"mocha": "7.2.0",
"nyc": "15.1.0",
"process": "0.11.10",
"rimraf": "3.0.2",
"sinon": "14.0.0",
"ts-loader": "8.3.0",
"ts-mocha": "10.0.0",
"typescript": "4.3.5",
"webpack": "5.72.0"
"webpack": "4.46.0"
},
"dependencies": {
"@opentelemetry/core": "^1.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,10 @@
* limitations under the License.
*/

const webpack = require('webpack');

const karmaWebpackConfig = require('../../../karma.webpack');
const karmaBaseConfig = require('../../../karma.base');

module.exports = (config) => {
{
const plugins = karmaWebpackConfig.plugins = [];
plugins.push(new webpack.ProvidePlugin({
process: 'process/browser',
}));
}

{
const plugins = karmaBaseConfig.plugins = [];
const toAdd = Object.keys(require('./package.json').devDependencies)
.filter((packageName) => packageName.startsWith('karma-'))
.map((packageName) => require(packageName));
plugins.push(
...toAdd
);
}

config.set(Object.assign({}, karmaBaseConfig, {
webpack: karmaWebpackConfig
}))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,32 +51,29 @@
},
"devDependencies": {
"@babel/core": "7.15.0",
"@jsdevtools/coverage-istanbul-loader": "3.0.5",
"@opentelemetry/api": "^1.0.0",
"@types/mocha": "8.2.3",
"@types/node": "16.11.21",
"@types/sinon": "10.0.2",
"@types/webpack-env": "1.16.2",
"assert": "2.0.0",
"babel-loader": "8.2.2",
"gts": "3.1.0",
"karma": "6.3.17",
"karma-chrome-launcher": "3.1.1",
"@jsdevtools/coverage-istanbul-loader": "3.0.5",
"karma": "6.3.16",
"karma-chrome-launcher": "3.1.0",
"karma-coverage-istanbul-reporter": "3.0.3",
"karma-mocha": "2.0.1",
"karma-spec-reporter": "0.0.33",
"karma-webpack": "5.0.0",
"karma-spec-reporter": "0.0.32",
"karma-webpack": "4.0.2",
"mocha": "7.2.0",
"nyc": "15.1.0",
"process": "0.11.10",
"rimraf": "3.0.2",
"sinon": "14.0.0",
"ts-loader": "8.3.0",
"ts-mocha": "10.0.0",
"typescript": "4.3.5",
"util": "0.12.4",
"webpack": "5.72.0",
"webpack-cli": "4.9.2",
"webpack": "4.46.0",
"webpack-cli": "4.7.2",
"webpack-merge": "5.8.0"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,12 @@
* limitations under the License.
*/

const webpack = require('webpack');

const karmaWebpackConfig = require('../../../karma.webpack');
const karmaBaseConfig = require('../../../karma.base');

module.exports = (config) => {
{
const plugins = karmaWebpackConfig.plugins = [];
plugins.push(new webpack.ProvidePlugin({
process: 'process/browser',
}));
}

{
const plugins = karmaBaseConfig.plugins = [];
const toAdd = Object.keys(require('./package.json').devDependencies)
.filter((packageName) => packageName.startsWith('karma-'))
.map((packageName) => require(packageName));
plugins.push(
...toAdd
);
}

config.set(Object.assign({}, karmaBaseConfig, {
frameworks: karmaBaseConfig.frameworks.concat(['jquery-1.8.3']),
webpack: karmaWebpackConfig
webpack: karmaWebpackConfig,
}))
};
16 changes: 7 additions & 9 deletions plugins/web/opentelemetry-instrumentation-long-task/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,34 +48,32 @@
},
"devDependencies": {
"@babel/core": "7.15.0",
"@jsdevtools/coverage-istanbul-loader": "3.0.5",
"@opentelemetry/api": "^1.0.0",
"@opentelemetry/sdk-trace-base": "^1.3.1",
"@types/jquery": "3.5.6",
"@types/mocha": "7.0.2",
"@types/node": "16.11.21",
"@types/sinon": "10.0.2",
"@types/webpack-env": "1.16.2",
"assert": "2.0.0",
"babel-loader": "8.2.2",
"gts": "3.1.0",
"karma": "6.3.17",
"karma-chrome-launcher": "3.1.1",
"@jsdevtools/coverage-istanbul-loader": "3.0.5",
"karma": "6.3.16",
"karma-chrome-launcher": "3.1.0",
"karma-coverage-istanbul-reporter": "3.0.3",
"karma-jquery": "0.2.4",
"karma-mocha": "2.0.1",
"karma-spec-reporter": "0.0.33",
"karma-webpack": "5.0.0",
"karma-spec-reporter": "0.0.32",
"karma-webpack": "4.0.2",
"mocha": "7.2.0",
"nyc": "15.1.0",
"process": "0.11.10",
"rimraf": "3.0.2",
"sinon": "14.0.0",
"ts-loader": "8.3.0",
"ts-mocha": "10.0.0",
"typescript": "4.3.5",
"webpack": "5.72.0",
"webpack-cli": "4.9.2",
"webpack": "4.46.0",
"webpack-cli": "4.7.2",
"webpack-merge": "5.8.0",
"zone.js": "0.11.4"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,12 @@
* limitations under the License.
*/

const webpack = require('webpack');

const karmaWebpackConfig = require('../../../karma.webpack');
const karmaBaseConfig = require('../../../karma.base');

module.exports = (config) => {
{
const plugins = karmaWebpackConfig.plugins = [];
plugins.push(new webpack.ProvidePlugin({
process: 'process/browser',
}));
}

{
const plugins = karmaBaseConfig.plugins = [];
const toAdd = Object.keys(require('./package.json').devDependencies)
.filter((packageName) => packageName.startsWith('karma-'))
.map((packageName) => require(packageName));
plugins.push(
...toAdd
);
}

config.set(Object.assign({}, karmaBaseConfig, {
frameworks: karmaBaseConfig.frameworks.concat(['jquery-1.8.3']),
webpack: karmaWebpackConfig
webpack: karmaWebpackConfig,
}))
};
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
},
"devDependencies": {
"@babel/core": "7.15.0",
"@jsdevtools/coverage-istanbul-loader": "3.0.5",
"@opentelemetry/api": "^1.0.0",
"@opentelemetry/context-zone-peer-dep": "^1.3.1",
"@opentelemetry/instrumentation-xml-http-request": "^0.32.0",
Expand All @@ -58,26 +57,25 @@
"@types/node": "16.11.21",
"@types/sinon": "10.0.2",
"@types/webpack-env": "1.16.2",
"assert": "2.0.0",
"babel-loader": "8.2.2",
"gts": "3.1.0",
"karma": "6.3.17",
"karma-chrome-launcher": "3.1.1",
"@jsdevtools/coverage-istanbul-loader": "3.0.5",
"karma": "6.3.16",
"karma-chrome-launcher": "3.1.0",
"karma-coverage-istanbul-reporter": "3.0.3",
"karma-jquery": "0.2.4",
"karma-mocha": "2.0.1",
"karma-spec-reporter": "0.0.33",
"karma-webpack": "5.0.0",
"karma-spec-reporter": "0.0.32",
"karma-webpack": "4.0.2",
"mocha": "7.2.0",
"nyc": "15.1.0",
"process": "0.11.10",
"rimraf": "3.0.2",
"sinon": "14.0.0",
"ts-loader": "8.3.0",
"ts-mocha": "10.0.0",
"typescript": "4.3.5",
"webpack": "5.72.0",
"webpack-cli": "4.9.2",
"webpack": "4.46.0",
"webpack-cli": "4.7.2",
"webpack-merge": "5.8.0",
"zone.js": "0.11.4"
},
Expand Down
Loading

0 comments on commit 954f29c

Please sign in to comment.