Repository navigation
Use devenv in CI #8
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install Nix | |
| uses: cachix/install-nix-action@v31 | |
| # The devenv cache has prebuilt packages, so the dev shell builds faster. | |
| - name: Use the devenv cache | |
| uses: cachix/cachix-action@v17 | |
| with: | |
| name: devenv | |
| - name: Install devenv | |
| run: nix profile add nixpkgs#devenv | |
| # The eslint, tsc and prettier hooks use the tools from node_modules. | |
| - name: Install dependencies | |
| run: devenv shell -- pnpm install --frozen-lockfile | |
| - name: Run the git hooks | |
| run: devenv test | |
| - name: Run build | |
| run: devenv shell -- pnpm run build |