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

Use ember-try for scenario testing because multiple dependencies need… #1573

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from
Draft
14 changes: 8 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ jobs:
fail-fast: false
matrix:
deps:
- ember-cli@latest
- ember-cli@beta
- typescript@latest
- typescript@next
- ember-cli-release
- ember-cli-beta
- typescript-release
- typescript-beta
steps:
- name: Checkout Code
uses: actions/checkout@v2
Expand All @@ -99,9 +99,11 @@ jobs:
- name: Raise Watched File Limit
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- name: Install Dependencies
run: yarn add --dev ${{ matrix.deps }}
run: yarn install
- name: Prepare CI Environment
run: yarn ci:prepare
run: |
yarn prepublishOnly
yarn ember try:one ${{matrix.deps}} --skip-cleanup --- echo 'setup'
- name: Ember App Tests
run: yarn ci:test:app
- name: Node Tests
Expand Down
100 changes: 66 additions & 34 deletions config/ember-try.js
Original file line number Diff line number Diff line change
@@ -1,44 +1,76 @@
module.exports = {
useYarn: true,
command: 'yarn ci:test',
scenarios: [
{
name: 'defaults',
npm: {
devDependencies: {},
const getChannelUrl = require('ember-source-channel-url');

module.exports = async function () {
const ember5Deps = {
'ember-cli-htmlbars': '^6.3.0',
'ember-cli-babel': '^8.0.0',
'ember-resolver': '^11.0.0',
'ember-cli-dependency-checker': null,
'ember-maybe-import-regenerator': null,
'ember-cli-app-version': null,
// These tests deps are kind of entangled
'@ember/test-helpers': '^3.2.0',
'ember-qunit': '^8.0.0',
qunit: '^2.20.0',
// required for ember 4+
'ember-auto-import': '^2.3.0',
webpack: '^5.88.2',
// required for ember 5+
'@ember/string': '^3.1.1',
// not needed anymore, because the corresponding packages
// ship their own types
'@types/ember__test-helpers': null,
'@types/ember-resolver': null,
};

return {
useYarn: true,
command: 'yarn ci:test',
scenarios: [
{
name: 'defaults',
npm: {
devDependencies: {},
},
},
},
{
name: 'typescript-release',
npm: {
devDependencies: {
typescript: 'latest',
{
name: 'typescript-release',
npm: {
devDependencies: {
typescript: 'latest',
},
},
},
},
{
name: 'typescript-beta',
npm: {
devDependencies: {
typescript: 'next',
{
name: 'typescript-beta',
npm: {
devDependencies: {
typescript: 'next',
},
},
},
},
{
name: 'ember-cli-release',
npm: {
devDependencies: {
'ember-cli': 'latest',
{
name: 'ember-cli-release',
npm: {
ember: { edition: 'octane' },
devDependencies: {
'ember-cli': 'latest',
'ember-source': await getChannelUrl('release'),
...ember5Deps,
},
},
},
},
{
name: 'ember-cli-beta',
npm: {
devDependencies: {
'ember-cli': 'beta',
{
name: 'ember-cli-beta',
npm: {
ember: { edition: 'octane' },
devDependencies: {
'ember-cli': 'beta',
'ember-source': await getChannelUrl('beta'),
...ember5Deps,
},
},
},
},
],
],
};
};
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
},
"devDependencies": {
"@ember/optional-features": "2.0.0",
"@ember/test-helpers": "^2.9.4",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.1.2",
"@release-it-plugins/lerna-changelog": "^5.0.0",
Expand All @@ -64,15 +65,15 @@
"@types/console-ui": "2.2.6",
"@types/core-object": "3.0.1",
"@types/debug": "4.1.7",
"@types/ember": "4.0.1",
"@types/ember-qunit": "5.0.0",
"@types/ember": "4.0.6",
"@types/ember-resolver": "^5.0.13",
"@types/esprima": "4.0.3",
"@types/express": "4.17.13",
"@types/fs-extra": "9.0.13",
"@types/got": "9.6.12",
"@types/mocha": "10.0.0",
"@types/node": "14.14.31",
"@types/qunit": "2.19.3",
"@types/qunit": "2.19.6",
"@types/resolve": "1.20.1",
"@types/semver": "7.3.9",
"@typescript-eslint/eslint-plugin": "5.10.1",
Expand All @@ -96,10 +97,11 @@
"ember-export-application-global": "2.0.1",
"ember-load-initializers": "2.1.2",
"ember-maybe-import-regenerator": "0.1.6",
"ember-qunit": "4.6.0",
"ember-qunit": "^7.0.0",
"ember-resolver": "8.0.2",
"ember-source": "~3.28.0",
"ember-try": "1.4.0",
"ember-source-channel-url": "^3.0.0",
"ember-try": "3.0.0",
"eslint": "8.7.0",
"eslint-config-prettier": "8.3.0",
"eslint-plugin-ember": "10.5.8",
Expand Down
5 changes: 4 additions & 1 deletion tests/dummy/config/optional-features.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"jquery-integration": false
"application-template-wrapper": false,
"default-async-observers": true,
"jquery-integration": false,
"template-only-glimmer-components": true
}
7 changes: 0 additions & 7 deletions tests/dummy/config/targets.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@

const browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];

const isCI = !!process.env.CI;
const isProduction = process.env.EMBER_ENV === 'production';

if (isCI || isProduction) {
browsers.push('ie 11');
}

module.exports = {
browsers,
};
Loading
Loading