-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
docs: add GitLab CI configuration example to continuous integration g… #1731
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for biomejs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
We actually ship Docker images for Biome which can be used in GitLab CI. Maybe the example could use them instead. Save the user from installing Biome in a node image. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. @nhedger please check the docker side and merge it whenever you see fit :)
entrypoint: [""] # This is required for the image to work in GitLab CI | ||
stage: quality # Run in the quality stage | ||
script: | ||
- biome ci src --reporter=gitlab --colors=off --log-level=none --diagnostic-level=error > code-quality.json # Execute Biome on the 'src' directory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- biome ci src --reporter=gitlab --colors=off --log-level=none --diagnostic-level=error > code-quality.json # Execute Biome on the 'src' directory | |
- biome ci --reporter=gitlab > code-quality.json |
Perhaps the example should be less opinionated unless these additional params have been added so that exporting code-quality.json works as expected. You probably have tested this better than I have, so I'll trust your jugement on this.
Regardless, we probably don't want to refer to src
, because there may be supported files somewhere else in the project
artifacts: | ||
paths: | ||
- code-quality.json # Collect the code quality report as an artifact | ||
needs: [] # No dependent jobs needed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs: [] # No dependent jobs needed |
If not required perhaps we could do without it in the example
rules: | ||
- if: $CI_COMMIT_BRANCH # Run job for commits on branches | ||
- if: $CI_MERGE_REQUEST_ID # Run job for merge requests | ||
allow_failure: true # Allow the job to fail (adjust as needed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
allow_failure: true # Allow the job to fail (adjust as needed) |
Perhaps we remove this one too. I expect people who use GitLab CI on a daily basis to know about this option. It keeps the example leaner. What do you think ?
Summary
Added example for usage in GitLab CI pipelines