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

Use a single lint task in CI #7540

Merged
merged 3 commits into from
Sep 19, 2024
Merged

Use a single lint task in CI #7540

merged 3 commits into from
Sep 19, 2024

Conversation

konstin
Copy link
Member

@konstin konstin commented Sep 19, 2024

We initially had two jobs for fast lints, one for Python and one for Rust (rustfmt). We now have fast lints for more (Rust, Python, {json5,yaml,yml}, Markdown, Readme). Instead of arbitrarily splitting the new cases between Python or Rust and reporting e.g. Prettier failures as Rust problems, we run them in a single job that's still <1min on a regular runner. This also reduces our large test matrix by one job.

Note: Before merging, we need to change the required checks configuration in the settings.

We have fast lints for different languages (Rust, Python, {json5,yaml,yml}, Markdown). Instead of arbitrarily splitting them and reporting e.g. prettier failures as Rust problems, we run them in a single job that's still <1min on a regular runner. This also reduces the test matrix by one job.
@konstin konstin added the internal A refactor or improvement that is not user-facing label Sep 19, 2024
.github/workflows/ci.yml Outdated Show resolved Hide resolved
Copy link
Member

@zanieb zanieb left a comment

Choose a reason for hiding this comment

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

🥳 sorry didn't realize we weren't already using it elsewhere

@zanieb
Copy link
Member

zanieb commented Sep 19, 2024

I disabled the branch protection check for 'cargo fmt'

@zanieb
Copy link
Member

zanieb commented Sep 19, 2024

I think you'll need to disable the cache

@konstin
Copy link
Member Author

konstin commented Sep 19, 2024

The cache dir is set unconditionally at https://github.com/astral-sh/setup-uv/blob/ce0062aac78b2f340c6612e0e40b80a2fa668ced/src/setup-uv.ts#L48. We can't unset an env var (actions/runner#1126), but we should also in general make our test suite robust against UV_CACHE_DIR being set. Follow-up #7542

@konstin konstin merged commit 4fdf5fc into main Sep 19, 2024
58 checks passed
@konstin konstin deleted the konsti/single-lint branch September 19, 2024 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal A refactor or improvement that is not user-facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants