pull/2868/head
filip mertens 2 years ago
parent dbe5210c97
commit db8d967b57
  1. 10
      .circleci/config.yml
  2. 6
      apps/remix-ide/ci/browser_test.sh
  3. 27
      apps/remix-ide/ci/splice_tests.js

@ -81,7 +81,9 @@ jobs:
type: string
group:
type: string
parallelism: 95
groupsize:
type: number
parallelism: 10
steps:
- browser-tools/install-browser-tools
- run:
@ -111,7 +113,7 @@ jobs:
name: Start Selenium
command: java -jar /usr/local/bin/selenium.jar
background: true
- run: ./apps/remix-ide/ci/<< parameters.script >> << parameters.browser >> << parameters.group >>
- run: ./apps/remix-ide/ci/<< parameters.script >> << parameters.browser >> << parameters.grousize >> << parameters.group >>
- store_test_results:
path: ./reports/tests
- store_artifacts:
@ -245,6 +247,7 @@ workflows:
browser: ["chrome", "firefox"]
script: ["flaky.sh"]
group: ["nogroup"]
groupsize: [1]
build_all:
unless: << pipeline.parameters.run_flaky_tests >>
jobs:
@ -269,7 +272,8 @@ workflows:
parts: ["1"]
browser: ["chrome", "firefox"]
script: ["browser_test.sh"]
group: ["a-c","d-f","g-m","n-r","s","t-z"]
group: ["0","1","2","3","4","5","6"]
groupsize: [7]
- deploy-remix-live:
requires:
- lint

@ -16,8 +16,10 @@ yarn run remixd &
sleep 5
yarn run build:e2e
grep -IRiL "@disabled" "dist/apps/remix-ide-e2e/src/tests" | grep "\.spec\|\.test" | xargs -I {} basename {} .test.js | grep -E "\b[${2}]"
TESTFILES=$(grep -IRiL "@disabled" "dist/apps/remix-ide-e2e/src/tests" | grep "\.spec\|\.test" | xargs -I {} basename {} .test.js | grep -E "\b[$2]" | circleci tests split --split-by=timings )
# grep -IRiL "@disabled" "dist/apps/remix-ide-e2e/src/tests" | grep "\.spec\|\.test" | xargs -I {} basename {} .test.js | grep -E "\b[${2}]"
# TESTFILES=$(grep -IRiL "@disabled" "dist/apps/remix-ide-e2e/src/tests" | grep "\.spec\|\.test" | xargs -I {} basename {} .test.js | grep -E "\b[$2]" | circleci tests split --split-by=timings )
node apps/remix-ide/ci/splice_tests.js $2 $3
TESTFILES = $(node apps/remix-ide/ci/splice_tests.js 10 $2 $3 | circleci tests split --split-by=timings)
for TESTFILE in $TESTFILES; do
npx nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/${TESTFILE}.test.js --env=$1 || TEST_EXITCODE=1
done

@ -0,0 +1,27 @@
const fs = require('fs')
var exec = require('child_process').exec;
let cmd = `grep -IRiL "@disabled" "dist/apps/remix-ide-e2e/src/tests"`
// get command line arguments
let args = process.argv.slice(2)
const grouplength = args[0] || 10;
const group = args[1] || 0;
exec(cmd, (error, stdout, stderr) => {
if (error) {
console.error(`error: ${error.message}`);
return;
}
if (stderr) {
console.error(`stderr: ${stderr}`);
return;
}
let files = stdout.split('\n').filter(f => f.includes('.test')).map(f => f.replace('dist/apps/remix-ide-e2e/src/tests/', '')).map(f => f.replace('.js', ''))
let splitIndex = Math.ceil(files.length / grouplength);
const parts = []
for (let i = 0; i < grouplength; i++) {
parts.push(files.slice(i * splitIndex, (i + 1) * splitIndex))
}
console.log(parts[group].join('\n'))
});
Loading…
Cancel
Save