From f546e0356de4a10f93c73da933ac266e24385805 Mon Sep 17 00:00:00 2001 From: Fernando Ayats Date: Mon, 24 Jul 2023 18:20:27 +0200 Subject: [PATCH] add basic checks --- .github/workflows/ci.yaml | 29 +++++++++++++++++++++++++++++ flake.nix | 14 ++++++-------- 2 files changed, 35 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..6f66802 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,29 @@ +name: ci + +on: + push: + pull_request: + +jobs: + deploy: + runs-on: ubuntu-latest + + permissions: + pages: write + id-token: write + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main + + - name: Install Magic Nix Cache + uses: DeterminateSystems/magic-nix-cache-action@main + + - name: Check + run: nix flake check -L + + - name: Show + run: nix flake show diff --git a/flake.nix b/flake.nix index ee20057..c22ccb4 100644 --- a/flake.nix +++ b/flake.nix @@ -25,19 +25,17 @@ formatter = forAllSystems (pkgs: pkgs.alejandra); - wrapperConfigurations = forAllSystems (pkgs: { - test = self.lib { + checks = forAllSystems (pkgs: + (self.lib { inherit pkgs; modules = [./tests/test-module.nix]; - }; - }); + }) + .config + .build + .packages); packages = forAllSystems (pkgs: { - test = self.lib.build { - inherit pkgs; - modules = [./tests/test-module.nix]; - }; } // doc.${pkgs.system}.packages);