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

test: Cache Babel output #5539

Merged
merged 1 commit into from
Aug 28, 2023
Merged

Conversation

joeyparrish
Copy link
Member

@joeyparrish joeyparrish commented Aug 27, 2023

This caches Babel's transpiler output for reuse, and should speed up all test runs in theory, but the effect is most noticeable on local test runs.

This uses a fork of karma-babel-preprocessor, which contains babel/karma-babel-preprocessor#77. If/when that PR is merged, we can move back to the upstream module.

Local runs will start faster because only modified source files will be re-processed through Babel when the tests start up.

In the Selenium workflow, Babel output and node_modules will both be computed by the singular build-shaka job, stored, and then reused by all the Selenium lab matrix jobs.

On my workstation (3.3 GHz cores, 32GB RAM, spinning platter disk), I see tests start about ~60 seconds faster. In the lab (2.1-4.7 GHz cores, 64GB RAM, solid-state disk), I see tests start about ~10 seconds faster.

@github-actions
Copy link
Contributor

Incremental code coverage: No instrumented code was changed.

This should speed up local test runs, but also Selenium lab runs.

Babel output and node_modules will both be computed by the singular
build-shaka job and then reused by all the Selenium lab matrix jobs.
@avelad avelad added the component: tests The issue involves our automated tests (generally; otherwise use a more specific component) label Aug 28, 2023
@avelad avelad merged commit 92edb7b into shaka-project:main Aug 28, 2023
39 of 51 checks passed
@joeyparrish joeyparrish deleted the babel-caching branch August 28, 2023 16:31
joeyparrish added a commit that referenced this pull request Aug 30, 2023
This caches Babel's transpiler output for reuse, and should speed up all
test runs in theory, but the effect is most noticeable on local test
runs.

This uses a fork of karma-babel-preprocessor, which contains
babel/karma-babel-preprocessor#77. If/when that
PR is merged, we can move back to the upstream module.

Local runs will start faster because only modified source files will be
re-processed through Babel when the tests start up.

In the Selenium workflow, Babel output and node_modules will both be
computed by the singular build-shaka job, stored, and then reused by all
the Selenium lab matrix jobs.

On my workstation (3.3 GHz cores, 32GB RAM, spinning platter disk), I
see tests start about ~60 seconds faster. In the lab (2.1-4.7 GHz cores,
64GB RAM, solid-state disk), I see tests start about ~10 seconds faster.
joeyparrish added a commit that referenced this pull request Aug 30, 2023
This caches Babel's transpiler output for reuse, and should speed up all
test runs in theory, but the effect is most noticeable on local test
runs.

This uses a fork of karma-babel-preprocessor, which contains
babel/karma-babel-preprocessor#77. If/when that
PR is merged, we can move back to the upstream module.

Local runs will start faster because only modified source files will be
re-processed through Babel when the tests start up.

In the Selenium workflow, Babel output and node_modules will both be
computed by the singular build-shaka job, stored, and then reused by all
the Selenium lab matrix jobs.

On my workstation (3.3 GHz cores, 32GB RAM, spinning platter disk), I
see tests start about ~60 seconds faster. In the lab (2.1-4.7 GHz cores,
64GB RAM, solid-state disk), I see tests start about ~10 seconds faster.
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Oct 27, 2023
@shaka-project shaka-project locked as resolved and limited conversation to collaborators Oct 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: tests The issue involves our automated tests (generally; otherwise use a more specific component) status: archived Archived and locked; will not be updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants