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(ember): Restore local and PR tests #4205

Merged
merged 2 commits into from
Dec 1, 2021

Conversation

lobsterkatie
Copy link
Member

@lobsterkatie lobsterkatie commented Dec 1, 2021

Given that ember tests take longer to run than most other tests (and have been known to fail for reasons having nothing to do with whatever PR we're working on), in #3571 we stopped running them locally and on PRs*, instead only running them when merging to master or releasing.

*Provided the PR didn't touch any of the @sentry/ember code

As a result, we didn't catch a currently-failing ember test until later than we would have liked. To prevent that from happening again, this PR restores the running of ember tests (both locally and on PRs), but restricts which tests run in each circumstance, in order to prevent this change from slowing down the overall repo test suite more than necessary. Specifically:

  • Locally, we run tests only against the current version of ember.
  • In the context of a PR, we run tests against the current version, the LTS version, and a version using embroider (which is an optional ember compiler many people use).
  • When merging to master or creating a release, for greatest safety, we test against current, LTS, embroider, beta, and "classic" (a legacy ember version).

Key changes:

  • Up until now, the logic controlling which set of ember tests to run has been split between a script (run_tests.js, which differentiated local runs from CI runs), and the GHA workflow config (build.yml, which differentiated PRs from merges into master and creation of releases). That work is now consolidated into the ember-try config (since ember-try is the runner which needs to know which tests to run in the first place!).
  • As a result of the above change, the method for forcing tests for all versions of ember to run needed to be modified. That option is now handled by a new script, run-CI-tests.js, which simply mimics the the third situation above by setting environment variables, thereby tricking ember-try into thinking it needs to run all tests.

Note: This is not meant to address the currently-failing ember tests, just make them more visible. Since they're not required, though, this shouldn't be a blocker.

@lobsterkatie lobsterkatie force-pushed the kmclb-restore-ember-tests-in-ci branch from 659acb1 to d9da1fb Compare December 1, 2021 07:39
@lobsterkatie lobsterkatie force-pushed the kmclb-restore-ember-tests-in-ci branch from d9da1fb to 0d2517d Compare December 1, 2021 07:44
@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2021

size-limit report

Path Size
@sentry/browser - CDN Bundle (gzipped) 22.49 KB (+0.02% 🔺)
@sentry/browser - Webpack 23.37 KB (0%)
@sentry/react - Webpack 23.4 KB (0%)
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 29.93 KB (+0.01% 🔺)

@lobsterkatie lobsterkatie merged commit 5f5e9ec into master Dec 1, 2021
@lobsterkatie lobsterkatie deleted the kmclb-restore-ember-tests-in-ci branch December 1, 2021 14:26
AbhiPrasad pushed a commit that referenced this pull request Dec 1, 2021
Given that ember tests take longer to run than most other tests (and have been known to fail for reasons having nothing to do with whatever PR we're working on), in #3571 we stopped running them locally and on PRs*, instead only running them when merging to `master` or releasing.

*Provided the PR didn't touch any of the `@sentry/ember` code

As a result, we didn't catch a currently-failing ember test until later than we would have liked. To prevent that from happening again, this restores the running of ember tests (both locally and on PRs), but restricts which tests run in each circumstance, in order to prevent this change from slowing down the overall repo test suite more than necessary. Specifically:

- Locally, we run tests only against the current version of ember.
- In the context of a PR, we run tests against the current version, the LTS version, and a version using `embroider` (which is an optional ember compiler many people use).
- When merging to `master` or creating a release, for greatest safety, we test against current, LTS, embroider, beta, and "classic" (a legacy ember version).

Key changes:

- Up until now, the logic controlling which set of ember tests to run has been split between a script (`run_tests.js`, which differentiated local runs from CI runs), and the GHA workflow config (`build.yml`, which differentiated PRs from merges into master and creation of releases). That work is now consolidated into the ember-try config (since ember-try is the runner which needs to know which tests to run in the first place!).
- As a result of the above change, the method for forcing tests for all versions of ember to run needed to be modified. That option is now handled by a new script, `run-CI-tests.js`, which simply mimics the the third situation above by setting environment variables, thereby tricking ember-try into thinking it needs to run all tests.
onurtemizkan pushed a commit that referenced this pull request Dec 19, 2021
Given that ember tests take longer to run than most other tests (and have been known to fail for reasons having nothing to do with whatever PR we're working on), in #3571 we stopped running them locally and on PRs*, instead only running them when merging to `master` or releasing.

*Provided the PR didn't touch any of the `@sentry/ember` code

As a result, we didn't catch a currently-failing ember test until later than we would have liked. To prevent that from happening again, this restores the running of ember tests (both locally and on PRs), but restricts which tests run in each circumstance, in order to prevent this change from slowing down the overall repo test suite more than necessary. Specifically:

- Locally, we run tests only against the current version of ember.
- In the context of a PR, we run tests against the current version, the LTS version, and a version using `embroider` (which is an optional ember compiler many people use).
- When merging to `master` or creating a release, for greatest safety, we test against current, LTS, embroider, beta, and "classic" (a legacy ember version).

Key changes:

- Up until now, the logic controlling which set of ember tests to run has been split between a script (`run_tests.js`, which differentiated local runs from CI runs), and the GHA workflow config (`build.yml`, which differentiated PRs from merges into master and creation of releases). That work is now consolidated into the ember-try config (since ember-try is the runner which needs to know which tests to run in the first place!).
- As a result of the above change, the method for forcing tests for all versions of ember to run needed to be modified. That option is now handled by a new script, `run-CI-tests.js`, which simply mimics the the third situation above by setting environment variables, thereby tricking ember-try into thinking it needs to run all tests.
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.

2 participants