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

Fix ci and get working with Ember 5 #916

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
24aba7b
Add `fetch` API globals
bobisjan Jul 5, 2022
217b878
Remove `ember-fetch` add-on
bobisjan Jul 8, 2022
993f948
Update minimum version of @glimmer/component to 1.1.2
rwjblue Feb 3, 2023
72bbce4
Update ember-source to 3.28 across the board
rwjblue Feb 3, 2023
7305665
Re-roll lock file
rwjblue Feb 3, 2023
ee411a1
fix prettier errors
nlfurniss Feb 9, 2023
b9834fd
fix more prettier errors
nlfurniss Feb 9, 2023
46fcfd0
update to v3.28.6 with ember-cli-update
mansona May 9, 2023
70830f1
add fail-fast: false and timeouts to github CI
mansona May 9, 2023
5748f13
Merge remote-tracking branch 'bobisjan/fetch' into fix_ci
Gaurav0 May 13, 2023
d8065ca
Merge remote-tracking branch 'origin/rwjblue/fix-ci' into fix_ci
Gaurav0 May 13, 2023
1d2a64f
fix fastboot-shoebox-test
Gaurav0 May 13, 2023
6fae554
update ember-data to 3.28
Gaurav0 May 13, 2023
11bf66d
skip a test that has been broken for two years
Gaurav0 May 13, 2023
f05785f
bump ember-cli-app-version in test-packages
Gaurav0 May 13, 2023
0a0ba35
bump more outdated dependencies
Gaurav0 May 13, 2023
8f46faf
fix sinon error
Gaurav0 May 13, 2023
0245602
explicitly add @ember/test-helpers to devDependencies in test-packages
Gaurav0 May 13, 2023
1b6bd35
fix qunit dom fixture in ember-cli-fastboot-testing-app
Gaurav0 May 13, 2023
89ecb72
fix ember-cli-fastboot-testing should use linked [email protected]
Gaurav0 May 13, 2023
961e776
fix lint
Gaurav0 May 13, 2023
6df1cc4
fix legacy mocha tests
Gaurav0 May 14, 2023
0673f6b
increase timeouts
Gaurav0 May 14, 2023
a0ef95b
test on Ember 4.8, 4.12
Gaurav0 May 14, 2023
34cee33
remove deprecated addon ember-export-application-global
Gaurav0 May 14, 2023
ac6f835
update ember-auto-import and ember-resolver
Gaurav0 May 15, 2023
e76ad8d
update fixture, skip manifest test
Gaurav0 May 15, 2023
8ffae96
update @ember/string
Gaurav0 May 16, 2023
80c4115
increase timeouts again
Gaurav0 May 16, 2023
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
18 changes: 15 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ jobs:
test-all-packages:
name: Ember Tests
runs-on: ${{ matrix.os }}
timeout-minutes: 30

strategy:
fail-fast: false
matrix:
node-version: [16.x, 14.x]
os: [ubuntu-latest, windows-latest]
Expand Down Expand Up @@ -51,8 +53,10 @@ jobs:
integration-tests:
name: Integration Tests
runs-on: ${{ matrix.os }}
timeout-minutes: 30

strategy:
fail-fast: false
matrix:
node-version: [16.x, 14.x]
os: [ubuntu-latest, windows-latest]
Expand All @@ -73,8 +77,10 @@ jobs:
test-packages:
name: Test Packages
runs-on: ${{ matrix.os }}
timeout-minutes: 30

strategy:
fail-fast: false
matrix:
node-version: [16.x, 14.x]
os: [ubuntu-latest, windows-latest]
Expand All @@ -99,6 +105,7 @@ jobs:
test-legacy-mocha:
name: Legacy Mocha Tests - ${{ matrix.node-version }}
runs-on: ubuntu-latest
timeout-minutes: 30

strategy:
fail-fast: false
Expand All @@ -109,20 +116,23 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: volta-cli/action@v1
uses: volta-cli/action@v4
with:
node-version: ${{ matrix.node-version }}
- name: Yarn Install
run: |
yarn install --ignore-engines --frozen-lockfile
- name: Precook node_modules
run: |
yarn workspace ember-cli-fastboot pretest:precook
- name: Run Mocha Tests
run: |
yarn workspace ember-cli-fastboot test:mocha

try-scenarios:
name: "ember-try for ember-cli-fastboot: ${{ matrix.ember-try-scenario }}"
name: "${{ matrix.ember-try-scenario }} Scenario for ember-cli-fastboot"
runs-on: ubuntu-latest
timeout-minutes: 7
timeout-minutes: 30

strategy:
fail-fast: false
Expand All @@ -133,6 +143,8 @@ jobs:
- ember-lts-3.24
- ember-lts-3.28
- ember-lts-4.4
- ember-lts-4.8
- ember-lts-4.12
- ember-release
- ember-beta
- ember-canary
Expand Down
16 changes: 12 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@
"type": "git",
"url": "[email protected]:ember-fastboot/ember-cli-fastboot.git"
},
"workspaces": [
"packages/*",
"test-packages/*"
],
"workspaces": {
"packages": [
"packages/*",
"test-packages/*"
],
"nohoist": [
"**/ember-cli-addon-tests"
]
},
"scripts": {
"test": "npm-run-all test:*",
"test:ember-cli-fastboot": "yarn workspace ember-cli-fastboot test:ember",
Expand All @@ -24,6 +29,9 @@
"release-it-lerna-changelog": "^3.1.0",
"release-it-yarn-workspaces": "^2.0.0"
},
"resolutions": {
"fastboot": "4.1.1"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
},
Expand Down
1 change: 1 addition & 0 deletions packages/ember-cli-fastboot/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# misc
/coverage/
!.*
.*/
.eslintcache

# ember-try
Expand Down
31 changes: 14 additions & 17 deletions packages/ember-cli-fastboot/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,15 @@ module.exports = {
// node files
{
files: [
'.eslintrc.js',
'.prettierrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'tests/dummy/config/**/*.js',
'lib/**/*.js'
],
excludedFiles: [
'app/**',
'addon/**',
'addon-test-support/**',
'app/**',
'tests/dummy/app/**',
'./.eslintrc.js',
'./.prettierrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./index.js',
'./testem.js',
'./blueprints/*/index.js',
'./config/**/*.js',
'./tests/dummy/config/**/*.js',
],
parserOptions: {
sourceType: 'script',
Expand All @@ -56,5 +48,10 @@ module.exports = {
plugins: ['node'],
extends: ['plugin:node/recommended'],
},
{
// Test files:
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
},
],
};
1 change: 1 addition & 0 deletions packages/ember-cli-fastboot/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
/testem.js
/test/
/tests/
/yarn-error.log
/yarn.lock
.gitkeep

Expand Down
2 changes: 1 addition & 1 deletion packages/ember-cli-fastboot/.template-lintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';

module.exports = {
extends: 'octane',
extends: 'recommended',
};
25 changes: 25 additions & 0 deletions packages/ember-cli-fastboot/config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,22 @@ module.exports = async function () {
},
},
},
{
name: 'ember-lts-4.8',
npm: {
devDependencies: {
'ember-source': '~4.8.0',
},
},
},
{
name: 'ember-lts-4.12',
npm: {
devDependencies: {
'ember-source': '~4.12.0',
},
},
},
{
name: 'ember-release',
npm: {
Expand Down Expand Up @@ -116,6 +132,15 @@ module.exports = async function () {
},
},
},
{
name: 'ember-4.12-no-deprecations',
npm: {
devDependencies: {
'ember-source': '~4.12.0',
'ember-deprecation-error': '*',
},
},
},
{
name: 'ember-release-no-deprecations',
npm: {
Expand Down
8 changes: 7 additions & 1 deletion packages/ember-cli-fastboot/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,11 @@ module.exports = function (defaults) {
*/

const { maybeEmbroider } = require('@embroider/test-setup');
return maybeEmbroider(app);
return maybeEmbroider(app, {
skipBabel: [
{
package: 'qunit',
},
],
});
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
function initialize(instance) {
let { request } = instance.lookup('service:fastboot');
if (fetch) {
fetch.__fastbootRequest = request;
}
}

export default {
initialize,
};
10 changes: 10 additions & 0 deletions packages/ember-cli-fastboot/fix-node-modules.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));

const packagesDir = path.resolve(__dirname, '../../packages');
const nodeModulesDir = path.resolve(__dirname, 'node_modules');
const precookedDir = path.resolve(__dirname, 'tmp', 'precooked_node_modules');

// eslint-disable-next-line no-undef
const shouldRestore = process.argv[2];
Expand All @@ -29,18 +30,27 @@ Options:
function run(shouldRestore) {
['fastboot', 'fastboot-express-middleware'].forEach((packageName) => {
const nodeModulesPackageDir = path.join(nodeModulesDir, packageName);
const precookedPackageDir = path.join(precookedDir, packageName);
const workspacesPackageDir = path.resolve(packagesDir, packageName);
if (fs.existsSync(nodeModulesPackageDir)) {
console.log(chalk.blue(`remove ${nodeModulesPackageDir}`));
fs.removeSync(nodeModulesPackageDir);
}
if (fs.existsSync(precookedPackageDir)) {
console.log(chalk.blue(`remove ${precookedPackageDir}`));
fs.removeSync(precookedPackageDir);
}
if (!shouldRestore) {
console.log(
chalk.green(
`symlink ${nodeModulesPackageDir} -> ${workspacesPackageDir}`
)
);
fs.symlinkSync(workspacesPackageDir, nodeModulesPackageDir, 'dir');
console.log(
chalk.green(`symlink ${precookedPackageDir} -> ${workspacesPackageDir}`)
);
fs.symlinkSync(workspacesPackageDir, precookedPackageDir, 'dir');
}
});
}
51 changes: 28 additions & 23 deletions packages/ember-cli-fastboot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@
},
"scripts": {
"build": "ember build --environment=production",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
"lint:js": "eslint . --cache",
"release": "release-it",
"lint:js:fix": "eslint . --fix",
"start": "ember serve",
"test": "npm-run-all lint test:*",
"test:mocha": "node fix-node-modules.mjs && mocha && node fix-node-modules.mjs -r",
"pretest:precook": "node node_modules/ember-cli-addon-tests/scripts/precook-node-modules.js",
"test": "npm-run-all -s lint pretest:* test:*",
"test:mocha": "node fix-node-modules.mjs && mocha",
"test:ember": "ember test",
"test:precook": "node node_modules/ember-cli-addon-tests/scripts/precook-node-modules.js",
"test:ember-compatibility": "ember try:each"
},
"dependencies": {
Expand All @@ -35,7 +35,7 @@
"broccoli-merge-trees": "^4.2.0",
"broccoli-plugin": "^4.0.7",
"chalk": "^4.1.2",
"ember-cli-babel": "^7.26.6",
"ember-cli-babel": "^7.26.10",
"ember-cli-lodash-subset": "^2.0.1",
"ember-cli-preprocess-registry": "^3.3.0",
"ember-cli-version-checker": "^5.1.2",
Expand All @@ -45,54 +45,59 @@
"fs-extra": "^10.0.0",
"json-stable-stringify": "^1.0.1",
"md5-hex": "^3.0.1",
"node-fetch": "^2.6.7",
"recast": "^0.19.1",
"silent-error": "^1.1.1"
},
"fastbootDependencies": [
"node-fetch"
],
"devDependencies": {
"@ember/optional-features": "^2.0.0",
"@ember/string": "^3.1.0",
"@ember/test-helpers": "^2.6.0",
"@embroider/test-setup": "^0.37.0",
"@glimmer/component": "^1.0.4",
"@embroider/test-setup": "^0.48.1",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.0.4",
"babel-eslint": "^10.1.0",
"body-parser": "^1.18.3",
"broccoli-asset-rev": "^3.0.0",
"broccoli-test-helper": "^1.5.0",
"co": "4.6.0",
"chai": "^4.3.4",
"chai-fs": "^2.0.0",
"chai-string": "^1.4.0",
"co": "4.6.0",
"ember-auto-import": "^2.2.1",
"ember-cli": "~4.1.0",
"ember-cli-addon-tests": "^0.11.1",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-htmlbars": "^5.7.1",
"ember-cli-inject-live-reload": "^2.0.2",
"ember-cli-htmlbars": "^5.7.2",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.1",
"ember-cli-terser": "^4.0.2",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.1",
"ember-load-initializers": "^2.1.2",
"ember-maybe-import-regenerator-for-testing": "^1.0.0",
"ember-maybe-import-regenerator": "^1.0.0",
"ember-page-title": "^7.0.0",
"ember-qunit": "^5.1.5",
"ember-resolver": "^8.0.2",
"ember-sinon": "^2.2.0",
"ember-source": "~3.26.1",
"ember-resolver": "^10.0.0",
"ember-sinon": "^5.0.0",
"ember-source": "~3.28.11",
"ember-source-channel-url": "^3.0.0",
"ember-template-lint": "^3.2.0",
"ember-template-lint": "^3.15.0",
"ember-try": "^1.4.0",
"eslint": "^7.23.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-ember": "^10.3.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-ember": "^10.5.8",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-prettier": "^3.4.1",
"eslint-plugin-qunit": "^6.2.0",
"glob": "^7.1.3",
"loader.js": "^4.7.0",
"mocha": "^9.1.2",
"npm-run-all": "^4.1.5",
"prettier": "^2.2.1",
"qunit": "^2.14.1",
"prettier": "^2.5.1",
"qunit": "^2.17.2",
"qunit-dom": "^1.6.0",
"release-it": "^14.2.2",
"release-it-lerna-changelog": "^3.1.0",
Expand Down
Loading