Changed lint job to use nix develop
Since the pre-commit hooks are managed by devenv, the `.pre-commit-config.yaml` file isn't part of the repo anymore (it's generated by devenv).
This commit is contained in:
parent
8a676ecdd8
commit
88637aaae4
22
.github/workflows/build.yml
vendored
22
.github/workflows/build.yml
vendored
|
@ -5,21 +5,19 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: cachix/install-nix-action@v22
|
||||
- uses: cachix/cachix-action@v12
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: cachix/install-nix-action@v25
|
||||
|
||||
- run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
|
||||
|
||||
- name: Cache pre-commit environment
|
||||
uses: actions/cache@v3
|
||||
name: devenv
|
||||
- uses: cachix/cachix-action@v12
|
||||
with:
|
||||
path: ~/.cache/pre-commit
|
||||
key: pre-commit-${{ env.PY }}-${{ hashFiles('.pre-commit-config.yaml') }}
|
||||
|
||||
name: alejandr0angul0-dev
|
||||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||
- name: Run pre-commit hooks
|
||||
run: nix develop --command -- pre-commit run --show-diff-on-failure --color=always --from-ref origin/main --to-ref "$GITHUB_SHA"
|
||||
run: |
|
||||
git fetch origin
|
||||
nix develop --accept-flake-config --impure --command bash -c \
|
||||
"pre-commit run --from-ref origin/main --to-ref $GITHUB_SHA"
|
||||
|
||||
build:
|
||||
needs: pre-commit-hooks
|
||||
|
|
Loading…
Reference in a new issue