-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Docs: Add GitLab CI/CD to integrations. #13915
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -156,3 +156,25 @@ In addition, ruff publishes the following images: | |
|
|
||
| As with the distroless image, each image is published with ruff version tags as | ||
| `ruff:{major}.{minor}.{patch}-{base}` and `ruff:{major}.{minor}-{base}`, e.g., `ruff:0.6.6-alpine`. | ||
|
|
||
| ## GitLab CI/CD | ||
|
|
||
| You can add the following configuration to `.gitlab-ci.yml` to run a `ruff format`, and a `ruff check` compatible with GitLab's codequality. | ||
|
|
||
| ```yaml | ||
| Ruff: | ||
| stage: .pre | ||
jvacek marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| interruptible: true | ||
| image: | ||
| name: ghcr.io/astral-sh/ruff:0.7.1-alpine | ||
|
||
| variables: | ||
| CODE_LOCATION: $CI_PROJECT_DIR | ||
| script: | ||
| - cd $CODE_LOCATION | ||
| - ruff --version | ||
| - ruff check --output-format=gitlab > code-quality-report.json | ||
| - ruff format --diff --verbose | ||
jvacek marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| artifacts: | ||
| reports: | ||
| codequality: $CODE_LOCATION/code-quality-report.json | ||
| ``` | ||
Uh oh!
There was an error while loading. Please reload this page.