From ab153326d8cf0bc2699fc73b1c0f1e476ad419e1 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Tue, 1 Oct 2024 22:37:07 +0200 Subject: [PATCH] Tweak CI --- .../{nix-run.yml => nix-flake-check.yml} | 21 +++++++++++++++---- README.md | 2 +- 2 files changed, 18 insertions(+), 5 deletions(-) rename .github/workflows/{nix-run.yml => nix-flake-check.yml} (64%) diff --git a/.github/workflows/nix-run.yml b/.github/workflows/nix-flake-check.yml similarity index 64% rename from .github/workflows/nix-run.yml rename to .github/workflows/nix-flake-check.yml index ed5d892..8beb392 100644 --- a/.github/workflows/nix-run.yml +++ b/.github/workflows/nix-flake-check.yml @@ -1,4 +1,4 @@ -name: "nix-run" +name: "nix flake check" on: pull_request: paths-ignore: @@ -8,7 +8,7 @@ on: - 'README.md' jobs: - nix-run: + nix-flake-check: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -16,8 +16,21 @@ jobs: with: github_access_token: ${{ secrets.GITHUB_TOKEN }} - uses: DeterminateSystems/magic-nix-cache-action@v8 - - run: | - nix run . -- --version + + - name: Flake metadata + run: | + nix flake metadata + nix flake show + + - name: Flake check + run: | nix flake check -L + + - name: Run logwatch + run: | + nix run . -- --version + + - name: Formatter check + run: | nix fmt git diff --exit-code diff --git a/README.md b/README.md index 57e775a..251ce1f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # nixos-logwatch -[![nix run](https://github.com/SFrijters/nixos-logwatch/actions/workflows/nix-run.yml/badge.svg)](https://github.com/SFrijters/nixos-logwatch/actions/workflows/nix-run.yml) +[![nix flake check](https://github.com/SFrijters/nixos-logwatch/actions/workflows/nix-flake-check.yml/badge.svg)](https://github.com/SFrijters/nixos-logwatch/actions/workflows/nix-flake-check.yml) This flake provides a NixOS module for [logwatch](https://sourceforge.net/projects/logwatch/).