From 5c7d6f2b1d9449466cb8dec26b743abc1cd5b57a Mon Sep 17 00:00:00 2001 From: HarelM Date: Sat, 16 Dec 2023 20:53:58 +0200 Subject: [PATCH] Remove leftovers --- .github/workflows/ci.yml | 50 +--------------------------- config/wdio.conf.js | 51 ----------------------------- config/webpack.production.config.js | 4 +-- config/webpack.profiling.config.js | 5 +-- package.json | 1 - 5 files changed, 3 insertions(+), 108 deletions(-) delete mode 100644 config/wdio.conf.js diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff2c5f81..7756fe65 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -154,52 +154,4 @@ jobs: uses: cypress-io/github-action@v6 with: build: npm run build - start: npm run start - # build and test the editor - test_selenium_standalone: - name: "test/standalone-${{ matrix.browser }} (${{ matrix.os }})" - runs-on: ${{ matrix.os }} - - if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }} - - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - node-version: [18] - browser: [chrome, firefox] - - container: - image: node:${{ matrix.node-version }} - options: --network-alias testhost - - services: - selenium: - image: selenium/standalone-${{ matrix.browser }} - ports: - - 4444:4444 - options: --shm-size=2gb - - steps: - - uses: actions/checkout@v4 - - uses: actions/cache@v1 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- - - run: npm ci - - run: BROWSER=${{ matrix.browser }} TEST_NETWORK=testhost DOCKER_HOST=selenium npm run test - - if: ${{ matrix.browser == 'chrome' }} - run: ./node_modules/.bin/istanbul report --include build/coverage/coverage.json --dir build/coverage html lcov - - if: ${{ matrix.browser == 'chrome' }} - name: artifacts/coverage - uses: actions/upload-artifact@v1 - with: - name: coverage - path: build/coverage - - name: artifacts/screenshots - uses: actions/upload-artifact@v1 - with: - name: screenshots-${{ matrix.browser }} - path: build/screenshots + start: npm run start \ No newline at end of file diff --git a/config/wdio.conf.js b/config/wdio.conf.js deleted file mode 100644 index 6db6544c..00000000 --- a/config/wdio.conf.js +++ /dev/null @@ -1,51 +0,0 @@ -var webpack = require("webpack"); -var WebpackDevServer = require("webpack-dev-server"); -var webpackConfig = require("./webpack.config"); -var testConfig = require("../test/config/specs"); -var artifacts = require("../test/artifacts"); - - -var server; -var SCREENSHOT_PATH = artifacts.pathSync("screenshots"); - -exports.config = { - runner: 'local', - path: '/wd/hub', - - specs: [ - './test/functional/index.js' - ], - maxInstances: 10, - capabilities: [ - { - maxInstances: 5, - browserName: (process.env.BROWSER || 'chrome'), - 'goog:chromeOptions': { - args: ['headless=new'] - } - } - ], - // geckodriver-0.31 seems to have problems as of 2022 May 1 - services: process.env.DOCKER_HOST ? [] : [ ['selenium-standalone', { drivers: { firefox: 'latest', chrome: 'latest' } } ] ], - logLevel: 'warn', - bail: 0, - screenshotPath: SCREENSHOT_PATH, - hostname: process.env.DOCKER_HOST || "0.0.0.0", - framework: 'mocha', - reporters: ['spec'], - mochaOpts: { - ui: 'bdd', - // Because we don't know how long the initial build will take... - timeout: 4*60*1000, - }, - onPrepare: async function (config, capabilities) { - webpackConfig.devServer.host = testConfig.testNetwork; - webpackConfig.devServer.port = testConfig.port; - const compiler = webpack(webpackConfig); - server = new WebpackDevServer(webpackConfig.devServer, compiler); - await server.start(); - }, - onComplete: async function (exitCode, config, capabilities) { - await server.stop(); - } -} diff --git a/config/webpack.production.config.js b/config/webpack.production.config.js index fd460065..5ba8dca6 100644 --- a/config/webpack.production.config.js +++ b/config/webpack.production.config.js @@ -6,16 +6,14 @@ var HtmlWebpackInlineSVGPlugin = require('html-webpack-inline-svg-plugin'); var WebpackCleanupPlugin = require('webpack-cleanup-plugin'); var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; var CopyWebpackPlugin = require('copy-webpack-plugin'); -var artifacts = require("../test/artifacts"); -var OUTPATH = artifacts.pathSync("/build"); module.exports = { entry: { app: './src/index.jsx', }, output: { - path: OUTPATH, + path: "./build/build/", filename: '[name].[contenthash].js', chunkFilename: '[contenthash].js' }, diff --git a/config/webpack.profiling.config.js b/config/webpack.profiling.config.js index 84c4da23..be2be24f 100644 --- a/config/webpack.profiling.config.js +++ b/config/webpack.profiling.config.js @@ -1,13 +1,10 @@ const webpackProdConfig = require('./webpack.production.config'); -const artifacts = require("../test/artifacts"); - -const OUTPATH = artifacts.pathSync("/profiling"); module.exports = { ...webpackProdConfig, output: { ...webpackProdConfig.output, - path: OUTPATH, + path: "./build/profiling/", }, resolve: { ...webpackProdConfig.resolve, diff --git a/package.json b/package.json index 1ef5bbe5..14cf4aeb 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,6 @@ "test": "cross-env NODE_OPTIONS=--openssl-legacy-provider cross-env NODE_ENV=test wdio config/wdio.conf.js", "cy:run": "cypress run", "cy:open": "cypress open", - "test-watch": "cross-env NODE_OPTIONS=--openssl-legacy-provider cross-env NODE_ENV=test wdio config/wdio.conf.js --watch", "start": "cross-env NODE_OPTIONS=--openssl-legacy-provider webpack-dev-server --progress=profile --color --config config/webpack.config.js", "start-prod": "cross-env NODE_OPTIONS=--openssl-legacy-provider webpack-dev-server --progress=profile --color --config config/webpack.production.config.js", "start-sandbox": "cross-env NODE_OPTIONS=--openssl-legacy-provider webpack-dev-server --disable-host-check --host 0.0.0.0 --progress=profile --color --config config/webpack.production.config.js",