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

Add a CI job for ember-release with jQuery #5975

Merged
merged 5 commits into from
May 24, 2019
Merged

Add a CI job for ember-release with jQuery #5975

merged 5 commits into from
May 24, 2019

Conversation

dcyriller
Copy link
Contributor

With the recent switch from jQuery.ajax to fetch in the adapters code and the jQuery removal in Ember, this job aims at adding a small safety net.

Note: in the PR diff, you may notice a ember-3.4 removal in config/ember-try file: this config was unused in CI jobs. And I think it doesn't make much sense to activate it. Indeed, jQuery was not yet removed in ember-source@3.4.

@dcyriller dcyriller changed the title [chore] Add a CI job for ember-release with jQuery Add a CI job for ember-release with jQuery Apr 6, 2019
@runspired
Copy link
Contributor

I am 👍 for adding a scenario to test with jquery-removed, but after updating the LTS targets etc. for releases this now needs rebased (and potentially a slight touchup)

@rwjblue
Copy link
Member

rwjblue commented May 2, 2019

OK, I've pushed a few changes here:

  • Rebased
  • Add @ember/optional-features -- without this the other changes have no effect
  • Updated tests to run without jQuery by default (adding an ember-try scenario to test default-with-jquery)
  • Add Azure pipelines jobs for testing with jQuery

Now that jQuery is being properly removed, this has a few test failures (19). Most seem directly related to testing jQuery functionality and can be fixed by adding a test helper to guard those tests when jQuery is missing, but others will need to be looked into to see whats going on.

@dcyriller
Copy link
Contributor Author

I've reworked unit and integration tests for the rest adapter.

Previously, there were two different files: fetch and ajax to test the 2 different scenarios. As the CI will run the 2 scenarios, I've found out that they may be merged. It has the benefit to increase the fetch scenario coverage (that previously had less tests than the ajax one).

server.post('/posts', function() {
return [201, { 'Content-Type': 'application/json' }, ''];
});
if (hasjQuery) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've shamefully opted out of this last rest adapter integration test for fetch scenario. I've not been able to make it pass. The network call is not catched by pretender. I suspect an issue in Pretender.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me, but would you mind making an issue to dig into it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright 👍
Opened here: #6083

@rwjblue rwjblue requested a review from runspired May 4, 2019 00:15
@@ -78,6 +78,9 @@ jobs:
- name: 'Ember Release'
if: NOT tag IS present AND NOT (branch ~= /^(emberjs:release|emberjs:lts|release|lts).*/)
env: EMBER_TRY_SCENARIO=ember-release
- name: 'Ember Release with jQuery'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we run with/without against an LTS maybe?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's punt on that since we have to figure out running those things differently on azure anyway, which we seem to be gravitating towards a chron job for

@runspired
Copy link
Contributor

Needs a quick rebase but otherwise 👍 LGTM and would like to ship :)

@dcyriller
Copy link
Contributor Author

I've had more trouble than expected with the rebase. But it should be good now 👍

dcyriller and others added 5 commits May 15, 2019 12:47
With the recent switch from Query.ajax to fetch in the adapters code
and the jQuery removal in Ember, this job aims at adding a small safety
net.
* Add azure pipelines job
* Ensure @ember/optional-features is present (otherwise setting
  `EMBER_OPTIONAL_FEATURES` has no effect)
* Run tests without jQuery by default
From now on, dedicated CI jobs will run with and without jQuery.

This lets us simplify the adapters tests a bit. Indeed, the same tests will run
for fetch (without jQuery) and ajax (with jQuery).
...to run with both fetch and ajax. Previously, jQuery was always loaded
in the test suite. So this file was not run with fetch. Now, it is run
by default with fetch (not ajax). In CI, both scenarios should be run.
@runspired runspired merged commit f76df1d into emberjs:master May 24, 2019
pete-the-pete pushed a commit to pete-the-pete/data that referenced this pull request Jul 23, 2019
* Add a CI job for ember-release with jQuery

With the recent switch from Query.ajax to fetch in the adapters code
and the jQuery removal in Ember, this job aims at adding a small safety
net.

* Add azure pipelines job
* Ensure @ember/optional-features is present (otherwise setting
  `EMBER_OPTIONAL_FEATURES` has no effect)
* Run tests without jQuery by default
* tests: Merge fetch and ajax adapters tests

From now on, dedicated CI jobs will run with and without jQuery.

This lets us simplify the adapters tests a bit. Indeed, the same tests will run
for fetch (without jQuery) and ajax (with jQuery).

* Refactor rest-adapter integration test...

...to run with both fetch and ajax. Previously, jQuery was always loaded
in the test suite. So this file was not run with fetch. Now, it is run
by default with fetch (not ajax). In CI, both scenarios should be run.
@dcyriller dcyriller deleted the add-jquery-job branch August 28, 2019 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants