Skip to content
This repository was archived by the owner on Dec 7, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ workflows:
requires:
- Install dependencies
record: true # record results on Cypress Dashboard
parallel: true # split all specs across machines
parallelism: 4 # use 4 CircleCI machines to finish quickly
group: 'all tests' # name this group "all tests" on the dashboard
spec: 'cypress/integration/examples/misc.spec.js'
# parallel: true # split all specs across machines
# parallelism: 4 # use 4 CircleCI machines to finish quickly
# group: 'all tests' # name this group "all tests" on the dashboard
# typically you want Cypress to determine the build ID
# that ties all parallel test jobs together
# or you can pass your own ID using environment variables
ci-build-id: 'testing-commit-${CIRCLE_SHA1}'
# ci-build-id: 'testing-commit-${CIRCLE_SHA1}'
147 changes: 45 additions & 102 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "index.js",
"scripts": {
"test": "cypress run",
"cy:run": "node ./run-tests.js",
"effective:config": "circleci config process circle.yml"
},
"private": true,
Expand All @@ -20,6 +21,6 @@
},
"homepage": "https://github.com/cypress-io/circleci-orb-parallel-example#readme",
"devDependencies": {
"cypress": "9.0.0"
"cypress": "https://cdn.cypress.io/beta/npm/9.1.1/circle-tgriesser/fix/patch-resolutions-5bfb38533efdec896503458b5044d9cad22cf3a4/cypress.tgz"
}
}
37 changes: 37 additions & 0 deletions run-tests.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
const cypress = require('cypress')

const aberrations = []

cypress.run({
browser: 'electron',
parallel: true,
record: true,
group: 'all tests',
ciBuildId: process.env.CI_BUILD_ID,
key: process.env.CYPRESS_RECORD_KEY,
})
.then((results) => {
results.runs.forEach((run) => {
run.hooks.forEach((hook) => {
if (!hook.title || !hook.title.length || !hook.body) {
aberrations.push(hook)
}
})
run.tests.forEach((test) => {
if (!test.title || !test.title.length || !test.body) {
aberrations.push(test)
}
})
})

if (aberrations.length) {
console.log('--- ABERRATIONS ---')
console.log(aberrations)
process.exit(1)
}
})
.catch((err) => {
console.log('--- RUN ERROR ---')
console.log(err.stack)
process.exit(1)
})