From 16b7e6c2e6dc3ac76251f803aaa2a2429dbba4b6 Mon Sep 17 00:00:00 2001 From: John Titor <50095635+JohnRTitor@users.noreply.github.com> Date: Tue, 3 Dec 2024 18:23:59 +0530 Subject: [PATCH] ci: add Nixpkgs lib-tests workflow Ofborg also does this. Should be run on `lib/*` dirs Signed-off-by: John Titor <50095635+JohnRTitor@users.noreply.github.com> --- .github/workflows/eval-lib-tests.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/eval-lib-tests.yml diff --git a/.github/workflows/eval-lib-tests.yml b/.github/workflows/eval-lib-tests.yml new file mode 100644 index 0000000000000..bd49a60f12a5d --- /dev/null +++ b/.github/workflows/eval-lib-tests.yml @@ -0,0 +1,25 @@ +name: "Building Nixpkgs lib-tests" + +permissions: + contents: read + +on: + pull_request_target: + paths: + - 'lib/**' +jobs: + nixpkgs: + name: nixpkgs-lib-tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + # pull_request_target checks out the base branch by default + ref: refs/pull/${{ github.event.pull_request.number }}/merge + - uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # v30 + with: + # explicitly enable sandbox + extra_nix_config: sandbox = true + - name: Building Nixpkgs lib-tests + run: | + nix-build --arg pkgs "(import ./ci/. {}).pkgs" ./lib/tests/release.nix