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

Simplify test running in CI and locally #2044

Merged
merged 9 commits into from
Feb 3, 2023
Merged

Simplify test running in CI and locally #2044

merged 9 commits into from
Feb 3, 2023

Conversation

rotu
Copy link
Contributor

@rotu rotu commented Jan 9, 2023

Now you should be able to get meaningful results by simply running jest. Or npx majestic if you’re fancy and want a GUI.

Also, IDE integration with Jest plugins should work better, since now it is unambiguous which configuration applies to which test.

Note that render tests are not currently included since they don't currently run under Jest.

Finally, I consolidated a bunch of testing scripts so you don’t get a bajillion notifications for each push to a PR branch.

@rotu rotu force-pushed the tests branch 4 times, most recently from 2a70ff9 to 2d31c8a Compare January 9, 2023 04:00
@rotu rotu marked this pull request as draft January 9, 2023 04:01
@rotu rotu force-pushed the tests branch 11 times, most recently from 5c933eb to caea3be Compare January 10, 2023 06:14
@github-actions
Copy link
Contributor

github-actions bot commented Jan 10, 2023

Bundle size report:

Size Change: 0 B
Total Size Before: 208 kB
Total Size After: 208 kB

Output file Before After Change
maplibre-gl.js 199 kB 199 kB 0 B
maplibre-gl.css 9.1 kB 9.1 kB 0 B
ℹ️ View Details No major changes

@rotu rotu force-pushed the tests branch 13 times, most recently from 0f60c70 to b576ced Compare January 10, 2023 10:08
@rotu
Copy link
Contributor Author

rotu commented Jan 31, 2023

@HarelM Still in draft and a little stalled out. Don't worry about stepping on my toes here.

rotu added 2 commits February 2, 2023 12:34
consolidate jest tests under a single config
Now you should be able to get meaningful results and IDE integration with simply "jest".
Note that render tests are not included since they don't currently run under jest.

wip

remove extraneous X server

fix and improve build tests

style-spec
fix style-spec build
bump style-spec deps
remove unnecessary dependency on node url package

remove npm-plugin-playwright

wip

fix node version

kick off eslint and stylelint via jest

remove unused jest disable directives

jest-runner-eslint ignore (grrr)

use node lts

fix config

use jest builtin github action reporter

revert eslint change

Fail faster if gl package fails to return a context

more wip

more wip

continue on error

Update jest.config.ts

Update test-all.yml

Update jest.config.ts

don't run eslint via jest

update dependencies

fix test script and remove test-unit-ci

wip

maybe fix test?

i wonder if a 0-pixel framebuffer would work...

maybe try filtering by path again

wip

refigure query tests (half the runtime and more readable)

consolidate jest tests under a single config
Now you should be able to get meaningful results and IDE integration with simply "jest".
Note that render tests are not included since they don't currently run under jest.

wip

remove extraneous X server

fix and improve build tests

style-spec
fix style-spec build
bump style-spec deps
remove unnecessary dependency on node url package

remove npm-plugin-playwright

wip

fix node version

kick off eslint and stylelint via jest

remove unused jest disable directives

jest-runner-eslint ignore (grrr)

use node lts

fix config

use jest builtin github action reporter

revert eslint change

Fail faster if gl package fails to return a context

more wip

more wip

continue on error

Update jest.config.ts

Update test-all.yml

Update jest.config.ts

don't run eslint via jest

update dependencies

fix test script and remove test-unit-ci

wip

maybe fix test?

i wonder if a 0-pixel framebuffer would work...

maybe try filtering by path again

wip

refigure query tests (half the runtime and more readable)

consolidate jest tests under a single config
Now you should be able to get meaningful results and IDE integration with simply "jest".
Note that render tests are not included since they don't currently run under jest.

wip

remove extraneous X server

fix and improve build tests

style-spec
fix style-spec build
bump style-spec deps
remove unnecessary dependency on node url package

remove npm-plugin-playwright

wip

fix node version

kick off eslint and stylelint via jest

remove unused jest disable directives

jest-runner-eslint ignore (grrr)

use node lts

fix config

use jest builtin github action reporter

revert eslint change

Fail faster if gl package fails to return a context

more wip

more wip

continue on error

Update jest.config.ts

Update test-all.yml

Update jest.config.ts

don't run eslint via jest

update dependencies

fix test script and remove test-unit-ci

wip

maybe fix test?

i wonder if a 0-pixel framebuffer would work...

maybe try filtering by path again

wip

refigure query tests (half the runtime and more readable)

consolidate jest tests under a single config
Now you should be able to get meaningful results and IDE integration with simply "jest".
Note that render tests are not included since they don't currently run under jest.

wip

remove extraneous X server

fix and improve build tests

style-spec
fix style-spec build
bump style-spec deps
remove unnecessary dependency on node url package

remove npm-plugin-playwright

wip

fix node version

kick off eslint and stylelint via jest

remove unused jest disable directives

jest-runner-eslint ignore (grrr)

use node lts

fix config

use jest builtin github action reporter

revert eslint change

Fail faster if gl package fails to return a context

more wip

more wip

continue on error

Update jest.config.ts

Update test-all.yml

Update jest.config.ts

don't run eslint via jest

update dependencies

fix test script and remove test-unit-ci

wip

maybe fix test?

i wonder if a 0-pixel framebuffer would work...

maybe try filtering by path again

wip

refigure query tests (half the runtime and more readable)

consolidate jest tests under a single config
Now you should be able to get meaningful results and IDE integration with simply "jest".
Note that render tests are not included since they don't currently run under jest.

wip

remove extraneous X server

fix and improve build tests

style-spec
fix style-spec build
bump style-spec deps
remove unnecessary dependency on node url package

remove npm-plugin-playwright

wip

fix node version

kick off eslint and stylelint via jest

remove unused jest disable directives

jest-runner-eslint ignore (grrr)

use node lts

fix config

use jest builtin github action reporter

revert eslint change

Fail faster if gl package fails to return a context

more wip

more wip

continue on error

Update jest.config.ts

Update test-all.yml

Update jest.config.ts

don't run eslint via jest

update dependencies

fix test script and remove test-unit-ci

wip

maybe fix test?

i wonder if a 0-pixel framebuffer would work...

maybe try filtering by path again

wip

refigure query tests (half the runtime and more readable)

revert changes to query tests

wip: integration tests

remove separate query test build step

build dist before running integration tests with gl

readmes

add changelog

reset unrelated changes
@rotu rotu marked this pull request as ready for review February 2, 2023 19:12
@rotu rotu changed the title consolidate jest tests under a single config Simplify test running in CI and locally Feb 2, 2023
@rotu rotu requested a review from HarelM February 2, 2023 20:43
@rotu
Copy link
Contributor Author

rotu commented Feb 2, 2023

"non-render tests" is too generic, the integration, browser, unit separation is important to understand which tests failed. There's also a need to update a lot of the readme in this repo to reflect the changes you made to allow running some of the tests etc, maybe even add what you wrote above using jest majestic etc.

I think you should be able to run the tests generically, but dig into failures with specificity. I don't actually expect users to care about render vs non-render tests locally, since both should be able to run non-interactively on a local machine.

Is this still an issue?

@HarelM
Copy link
Collaborator

HarelM commented Feb 3, 2023

So the generation of the rest data is done in the test, right?

@HarelM
Copy link
Collaborator

HarelM commented Feb 3, 2023

This looks good in general, we can always improve according to feedback.

@rotu
Copy link
Contributor Author

rotu commented Feb 3, 2023

So the generation of the rest data is done in the test, right?

Yep. The test data is not so much “generated” as pulled together from a bunch of separate folders. I got rid of the extra step so now editing the test cases will show up in the test results without having to run that script!

@rotu rotu force-pushed the tests branch 3 times, most recently from 05ae23a to 3d25395 Compare February 3, 2023 20:38
Copy link
Collaborator

@HarelM HarelM left a comment

Choose a reason for hiding this comment

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

Thanks! If there are issues we can always change it in the future...

@HarelM
Copy link
Collaborator

HarelM commented Mar 14, 2023

@rotu did this PR remove coverage from the CI? I don't see any coverage report in the CI in recent PRs...

@rotu
Copy link
Contributor Author

rotu commented Mar 14, 2023

@HarelM I don't think we had any coverage reports before this PR. Could you link one of the coverage reports you're talking about?

@HarelM
Copy link
Collaborator

HarelM commented Mar 14, 2023

It was part of the CI, reported to the console.

@rotu rotu mentioned this pull request Mar 14, 2023
8 tasks
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