build: fix nix/direnv in github actions #175
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: pre-commit | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| jobs: | |
| pre-commit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: DeterminateSystems/nix-installer-action@v21 | |
| - uses: DeterminateSystems/magic-nix-cache-action@v13 | |
| - run: nix profile install nixpkgs#direnv | |
| - run: | | |
| direnv allow . | |
| direnv export bash >> "$GITHUB_ENV" | |
| - run: | | |
| pip install -r requirements/pre-commit.txt | |
| pre-commit run -a |