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

[BUGFIX TESTS] matrix tests for fastboot & ie11 w/jquery & fetch #6831

Merged
merged 4 commits into from
Dec 3, 2019
Merged
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
46 changes: 39 additions & 7 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]
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'
runspired marked this conversation as resolved.
Show resolved Hide resolved
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 }}
timeout-minutes: 4
run: yarn test:fastboot ${{ matrix.scenario }}

basic-tests-ie11:
needs: [lint]
timeout-minutes: 20
strategy:
matrix:
scenario: [with-native-fetch, with-ember-fetch-no-jquery, with-ember-fetch-and-jquery, with-jquery]
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 Expand Up @@ -153,7 +178,7 @@ jobs:
strategy:
fail-fast: false
matrix:
scenario: [ember-release, ember-beta, ember-canary, ember-release-with-jquery]
scenario: [ember-release, ember-beta, ember-canary]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
Expand All @@ -172,7 +197,14 @@ jobs:
needs: [lint, basic-tests]
strategy:
matrix:
scenario: [default-with-jquery, with-ember-fetch, with-max-transpilation]
scenario:
[
with-max-transpilation,
with-native-fetch,
with-ember-fetch-no-jquery,
with-ember-fetch-and-jquery,
with-jquery,
]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
Expand Down
24 changes: 17 additions & 7 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,14 @@ 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 test:try-one with-ember-fetch
displayName: 'Basic Tests with ember-fetch'
yarn install
yarn test:fastboot fastboot-with-jquery
displayName: 'Fastboot Tests with jquery'

- job: Windows_tests
dependsOn: Basic_Ember_Data_tests
Expand Down Expand Up @@ -189,12 +191,20 @@ jobs:
yarn install --no-lockfile --non-interactive

- script: |
yarn test:try-one default-with-jquery
yarn test:try-one with-jquery
displayName: 'Basic Tests with jQuery'

- script: |
yarn test:try-one ember-release-with-jquery
displayName: 'Ember Release Channel Tests with jQuery'
yarn test:try-one with-native-fetch
displayName: 'Basic Tests with Native fetch'

- script: |
yarn test:try-one with-ember-fetch-and-jquery
displayName: 'Basic Tests with both ember-fetch and jQuery present'

- script: |
yarn test:try-one with-ember-fetch-no-jquery
displayName: 'Basic Tests with ember-fetch but not jQuery'

- job: Floating_dependencies
dependsOn: Basic_Ember_Data_tests
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
57 changes: 37 additions & 20 deletions packages/-ember-data/config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,67 +8,84 @@ module.exports = function() {
useYarn: true,
scenarios: [
{
name: 'default',
name: 'with-max-transpilation',
env: {
TARGET_IE11: true,
},
npm: {},
},
{
name: 'with-ember-fetch',
name: 'with-ember-fetch-no-jquery',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({ 'jquery-integration': false }),
},
npm: {
devDependencies: {
'ember-fetch': '^6.5.1',
'@ember/jquery': null,
},
},
},
{
name: 'with-max-transpilation',
name: 'with-ember-fetch-and-jquery',
env: {
TARGET_IE11: true,
EMBER_OPTIONAL_FEATURES: JSON.stringify({ 'jquery-integration': true }),
},
npm: {
devDependencies: {
'ember-fetch': '^6.5.1',
'@ember/jquery': '^1.1.0',
},
},
npm: {},
},
{
name: 'default-with-jquery',
name: 'with-native-fetch',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({ 'jquery-integration': true }),
EMBER_OPTIONAL_FEATURES: JSON.stringify({ 'jquery-integration': false }),
},
npm: {
devDependencies: {
'ember-fetch': null,
'@ember/jquery': null,
},
},
npm: {},
},
{
name: 'ember-lts-3.8',
name: 'with-jquery',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({ 'jquery-integration': true }),
},
npm: {
devDependencies: {
'@ember/jquery': '^0.6.1',
'ember-source': '~3.8.0',
'ember-fetch': null,
'@ember/jquery': '^1.1.0',
},
},
},
{
name: 'ember-lts-3.12',
name: 'ember-lts-3.8',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({ 'jquery-integration': true }),
},
npm: {
devDependencies: {
'ember-source': '~3.12.0',
'@ember/jquery': '^1.1.0',
'ember-source': '~3.8.0',
},
},
},
{
name: 'ember-release',
name: 'ember-lts-3.12',
npm: {
devDependencies: {
'ember-source': urls[0],
'ember-source': '~3.12.0',
},
},
},
{
name: 'ember-release-with-jquery',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({ 'jquery-integration': true }),
},
name: 'ember-release',
npm: {
devDependencies: {
'@ember/jquery': '^0.6.1',
'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'));
runspired marked this conversation as resolved.
Show resolved Hide resolved
},
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 }),
runspired marked this conversation as resolved.
Show resolved Hide resolved
},
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