From 1751d65c3f31e452e0c09a462bfb3e8b32d23ab7 Mon Sep 17 00:00:00 2001 From: Peter Lehmann <36541313+peterablehmann@users.noreply.github.com> Date: Mon, 19 Feb 2024 00:26:04 +0100 Subject: [PATCH] workflows/check: Init --- .github/workflows/check.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/check.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..07c0c3e --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,37 @@ +name: check + +on: + push: + pull_request: + +permissions: read-all + +jobs: + Check: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v4 + - name: Setup Nix + uses: DeterminateSystems/nix-installer-action@main + with: + diagnostic-endpoint: "" + - name: Setup Nix cache + uses: DeterminateSystems/magic-nix-cache-action@main + + - name: "Run flake checks" + run: nix flake check --all-systems + Lint: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v4 + - name: Setup Nix + uses: DeterminateSystems/nix-installer-action@main + with: + diagnostic-endpoint: "" + + - name: Check format + run: nix fmt -- --check . + - name: Lint using Statix + run: nix run nixpkgs#statix -- check .