Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(showcase): speed up tests in CI #2176

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
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
1 change: 1 addition & 0 deletions .github/workflows/ci-components.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
working-directory: showcase
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN_COMPONENTS }}
PERCY_PARALLEL_TOTAL: 8

try-scenarios:
name: ${{ matrix.try-scenario }}
Expand Down
1 change: 1 addition & 0 deletions packages/components/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
drop
design-system-components
==============================================================================

Expand Down
5 changes: 3 additions & 2 deletions showcase/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
"lint:types": "glint",
"start": "yarn build:packages && ember serve",
"test": "concurrently \"yarn:lint\" \"yarn:test:*\" --names \"lint,test:\"",
"test:ember": "yarn build:packages && ember test",
"test:ember": "yarn build:packages && ember exam --split=8 --parallel",
"test:ember-compatibility": "ember try:each",
"test:ember:percy": "percy exec ember test",
"test:ember:percy": "percy exec -- ember exam --split=8 --parallel",
"test:a11y": "ENABLE_A11Y_AUDIT=true ember test --server",
"test:a11y-report": "ENABLE_A11Y_MIDDLEWARE_REPORTER=true ember test"
},
Expand Down Expand Up @@ -74,6 +74,7 @@
"ember-cli-terser": "^4.0.2",
"ember-concurrency": "^4.0.2",
"ember-deep-tracked": "^2.0.0",
"ember-exam": "^9.0.0",
"ember-load-initializers": "^2.1.2",
"ember-modifier": "^4.1.0",
"ember-page-title": "^8.2.3",
Expand Down
3 changes: 3 additions & 0 deletions showcase/testem.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
'use strict';

module.exports = {
// setting parallel execution to -1 means auto-detect and use the maximum number of parallel processes possible
// while setting it to 1 means executing tests serially, one after the other
parallel: process.env.CI ? -1 : 1,
Dhaulagiri marked this conversation as resolved.
Show resolved Hide resolved
test_page: 'tests/index.html?hidepassed',
disable_watching: true,
launch_in_ci: ['Chrome'],
Expand Down
3 changes: 2 additions & 1 deletion showcase/tests/test-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import config from 'showcase/config/environment';
import * as QUnit from 'qunit';
import { setApplication } from '@ember/test-helpers';
import { setup } from 'qunit-dom';
import { start } from 'ember-qunit';
// @ts-expect-error: there no types for this package
import start from 'ember-exam/test-support/start';
import {
DEFAULT_A11Y_TEST_HELPER_NAMES,
setRunOptions,
Expand Down
Loading
Loading