From 8aa31ff681a9568bf01c58fc5aeef3f07822f4a1 Mon Sep 17 00:00:00 2001 From: zimbatm Date: Sun, 9 Apr 2023 11:25:11 +0200 Subject: [PATCH] add CI Make sure that the schema stays valid --- .github/workflows/nix.yml | 15 +++++++++++++++ ci.sh | 7 +++++++ 2 files changed, 22 insertions(+) create mode 100644 .github/workflows/nix.yml create mode 100755 ci.sh diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml new file mode 100644 index 0000000..87de711 --- /dev/null +++ b/.github/workflows/nix.yml @@ -0,0 +1,15 @@ +name: Nix +on: + push: + branches: + - master + pull_request: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - uses: cachix/install-nix-action@v20 + - run: ./ci.sh diff --git a/ci.sh b/ci.sh new file mode 100755 index 0000000..5fc54dc --- /dev/null +++ b/ci.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# Test that the flake-registry.json format is valid +set -euo pipefail + +cd "$(dirname "$0")" + +nix run --flake-registry "$PWD/flake-registry.json" nixpkgs#hello