Closed thomasfr closed 1 week ago
This would be an amazing thing to have!
https://github.com/biomejs/setup-biome/blob/main/src/setup.ts#L41 Here is the biome source code for this, I think this would just be adapted to sherif for it to work
That's a good idea! Will take a look this weekend.
sherif@0.11.0
was just released and now contains the binaries in the GitHub release, so we should be able to do something similar as https://github.com/biomejs/setup-biome
Tested here and seems to work as expected now! The README has been updated to display a minimal example:
name: Sherif
on:
pull_request:
jobs:
check:
name: Run Sherif
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: QuiiBz/sherif@v1
# Optionally, you can specify a version and arguments to run Sherif with:
# with:
# version: 'v1.0.1'
# args: '--ignore-rule root-package-manager-field'
In CI/CD environments it would be handy to have an alternative installation method which does not require to have a running
node
andnpm
,pnpm
,yarn
, etc. setup in place. This would greatly reduce CI/CD setup time.For instance for
biome
we can do:and this finished usually within 5-7 seconds, whereas the setup of node and a package manager alone takes often times between 15-20 seconds. Its not much difference, but since sherif is a binary anyways, it would be an easy win.