streamline CI: drop nix-env install and flake update, use nix run for… #36
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: Nix Flake Check and Format | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| check-nix: | |
| name: Build, Check, and Format Nix Package | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Install Nix | |
| uses: cachix/install-nix-action@v24 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-unstable | |
| - name: Run Alejandra Formatter | |
| run: nix run nixpkgs#alejandra -- --check . | |
| - name: Nix Flake Checker | |
| uses: DeterminateSystems/flake-checker-action@v5 | |
| - name: Build the Nix Package | |
| run: nix build -L .#default | |
| - name: Print Success Message | |
| run: echo "Nix package built, formatted, and checked successfully!" |