Skip to content

Run precommit in its own job, cache the data #3094

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

Merged
merged 8 commits into from
Dec 16, 2019
Merged

Conversation

chriselion
Copy link
Contributor

@chriselion chriselion commented Dec 16, 2019

  • Move pre-commit to it's own job. Currently it runs on all 3 python testing jobs.
  • Cache the pre-commit cache (and venv). Timings below.

Should we also make the python unit test jobs dependent on precommit job?

Resolves:
https://jira.unity3d.com/browse/MLA-17
https://jira.unity3d.com/browse/MLA-394

@chriselion
Copy link
Contributor Author

Cache miss:
image

Cache hit (precommit only)
image

Cache hit (precommit + venv)
image

Total time for the run goes from 1:44 uncached to 0:42 cached.

@@ -55,14 +55,14 @@ repos:
types: [markdown]
- id: check-merge-conflict
args: [--assume-in-merge]
- id: check-yaml
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 can back this out, but I it saved me at least one bad config.yml push.

@chriselion chriselion changed the title Develop precommit ci Run precommit in its own job, cache the data Dec 16, 2019
@chriselion chriselion merged commit e08bd69 into master Dec 16, 2019
@delete-merged-branch delete-merged-branch bot deleted the develop-precommit-ci branch December 16, 2019 21:59
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants