Skip to content

Commit

Permalink
[BUGFIX TESTS] matrix tests for fastboot & ie11 w/jquery & fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired committed Dec 2, 2019
1 parent 3b4dcda commit 8a2e095
Show file tree
Hide file tree
Showing 8 changed files with 92 additions and 190 deletions.
35 changes: 30 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ jobs:
yarn run testem launchers
- name: Basic tests
run: yarn test
- name: Fastboot tests
run: yarn test:fastboot
- name: Production build
run: yarn test:production
- name: Docs tests
Expand Down Expand Up @@ -87,9 +85,33 @@ jobs:
EMBER_DATA_FEATURE_OVERRIDE: DISABLE_ALL
run: yarn test
fastboot-tests:
needs: [lint]
timeout-minutes: 6
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
scenario: [fastboot-with-ember-fetch, fastboot-with-jquery]
runs-on: ${{ matrix.os }}
steps:
- if: matrix.os == 'macos-latest'
run: |
brew update
brew cask install google-chrome
- uses: actions/checkout@master
- uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install dependencies
run: yarn install
- name: Fastboot Test ${{ matrix.scenario }}
run: yarn test:fastboot ${{ matrix.scenario }}

basic-tests-ie11:
needs: [lint]
timeout-minutes: 20
strategy:
matrix:
scenario: [default, default-with-jquery, with-ember-fetch]
runs-on: windows-latest
env:
TEST_IE11: true
Expand All @@ -104,8 +126,11 @@ jobs:
- name: Launcher Info
run: |
yarn run testem launchers
- name: Production build
run: yarn test:production
- name: Production tests with ${{ matrix.scenario }}
timeout-minutes: 6
env:
CI: true
run: yarn test:try-one ${{ matrix.scenario }} --- ember test -e production

floating-dependencies:
timeout-minutes: 4
Expand Down
11 changes: 9 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,17 @@ jobs:
displayName: 'Docs Tests'
- script: |
yarn test:fastboot
displayName: 'Fastboot Tests'
yarn install
yarn test:fastboot fastboot-with-ember-fetch
displayName: 'Fastboot Tests with ember-fetch'
- script: |
yarn install
yarn test:fastboot fastboot-with-jquery
displayName: 'Fastboot Tests with jquery'
- script: |
yarn install
yarn test:try-one with-ember-fetch
displayName: 'Basic Tests with ember-fetch'
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"test:try-one": "yarn workspace ember-data test:try-one",
"test:docs": "yarn workspace ember-data test:docs",
"test:encapsulation": "lerna run --scope='*-encapsulation-test-app' test",
"test:fastboot": "yarn workspace fastboot-test-app test",
"test:fastboot": "yarn workspace fastboot-test-app test:try-one",
"test-external:ember-m3": "./bin/test-external-partner-project.js ember-m3 https://github.com/hjdivad/ember-m3.git",
"test-external:ember-data-change-tracker": "./bin/test-external-partner-project.js ember-data-change-tracker https://github.com/danielspaniel/ember-data-change-tracker.git",
"test-external:model-fragments": "./bin/test-external-partner-project.js model-fragments https://github.com/lytics/ember-data-model-fragments.git",
Expand Down Expand Up @@ -95,7 +95,6 @@
"ember-decorators-polyfill": "^1.1.1",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.1",
"ember-fetch": "^6.7.2",
"ember-load-initializers": "^2.1.1",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-qunit": "^4.6.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/-ember-data/config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports = function() {
},
npm: {
devDependencies: {
'@ember/jquery': '^0.6.1',
'@ember/jquery': '^1.1.0',
'ember-source': '~3.8.0',
},
},
Expand Down Expand Up @@ -68,7 +68,7 @@ module.exports = function() {
},
npm: {
devDependencies: {
'@ember/jquery': '^0.6.1',
'@ember/jquery': '^1.1.0',
'ember-source': urls[0],
},
},
Expand Down
4 changes: 2 additions & 2 deletions packages/adapter/addon/rest.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,10 @@ const RESTAdapter = Adapter.extend(BuildURLMixin, {
if (this._fastboot) {
return this._fastboot;
}
return getOwner(this).lookup('service:fastboot');
return (this._fastboot = getOwner(this).lookup('service:fastboot'));
},
set(key, value) {
this._fastboot = value;
return (this._fastboot = value);
},
}),

Expand Down
33 changes: 33 additions & 0 deletions packages/unpublished-fastboot-test-app/config/ember-try.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
'use strict';

module.exports = function() {
return {
useYarn: true,
scenarios: [
{
name: 'fastboot-with-ember-fetch',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({ 'jquery-integration': false }),
},
npm: {
devDependencies: {
'ember-fetch': '^6.5.1',
'@ember/jquery': null,
},
},
},
{
name: 'fastboot-with-jquery',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({ 'jquery-integration': true }),
},
npm: {
devDependencies: {
'ember-fetch': null,
'@ember/jquery': '^1.1.0',
},
},
},
],
};
};
5 changes: 3 additions & 2 deletions packages/unpublished-fastboot-test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"lint:hbs": "ember-template-lint .",
"lint:js": "eslint --config ../../.eslintrc.js --ignore-path ../../.eslintignore .",
"start": "ember serve",
"test": "ember test --test-port=0"
"test": "ember test --test-port=0",
"test:try-one": "ember try:one"
},
"dependencies": {
"ember-data": "3.16.0-alpha.2",
Expand All @@ -31,6 +32,7 @@
"@types/rsvp": "^4.0.3",
"broccoli-asset-rev": "^3.0.0",
"ember-cli": "~3.14.0",
"ember-try": "^1.3.0",
"ember-cli-app-version": "^3.2.0",
"ember-cli-babel": "^7.13.0",
"ember-cli-dependency-checker": "^3.2.0",
Expand All @@ -42,7 +44,6 @@
"ember-cli-typescript": "^3.1.1",
"ember-cli-typescript-blueprints": "^3.0.0",
"ember-export-application-global": "^2.0.1",
"ember-fetch": "^6.7.2",
"ember-load-initializers": "^2.1.1",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-qunit": "^4.6.0",
Expand Down
Loading

0 comments on commit 8a2e095

Please sign in to comment.