diff --git a/.gitea/workflows/check.yaml b/.gitea/workflows/check.yaml new file mode 100644 index 0000000..b56c97c --- /dev/null +++ b/.gitea/workflows/check.yaml @@ -0,0 +1,33 @@ +name: Check +on: + push: + paths: + - '**.nix' + - flake.lock + - npins/sources.json + pull_request: + workflow_dispatch: + +jobs: + nix-flake: + name: Nix flake + runs-on: ubuntu-24.04 + + steps: + - name: Install QEMU + run: | + sudo apt update -y + sudo apt install -y qemu-user-static + + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@v22 + with: + extra-conf: | + log-lines = 500 + extra-platforms = aarch64-linux + + - name: Clone repository + uses: actions/checkout@v6 + + - name: Check Nix flake outputs + run: nix flake check --all-systems --show-trace diff --git a/.gitea/workflows/lint.yaml b/.gitea/workflows/lint.yaml new file mode 100644 index 0000000..52223ac --- /dev/null +++ b/.gitea/workflows/lint.yaml @@ -0,0 +1,35 @@ +name: Lint +on: + push: + paths: + - '**.nix' + - flake.lock + - npins/sources.json + pull_request: + workflow_dispatch: + +jobs: + nix-expressions: + name: Nix expressions + runs-on: ubuntu-24.04 + + steps: + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@v22 + with: + extra-conf: | + log-lines = 500 + + - name: Clone repository + uses: actions/checkout@v6 + + - name: Check if properly formatted + run: nix fmt -- -c . + + - name: Static code analysis + if: always() + run: nix run nixpkgs#statix -- check -i npins + + - name: Scan for dead code + if: always() + run: nix run nixpkgs#deadnix -- -f --exclude npins