From 123bfd6df233bd26cc458988cbfd24f63e9ef9a1 Mon Sep 17 00:00:00 2001 From: Raminder Singh Date: Fri, 31 Jul 2026 23:21:15 +0530 Subject: [PATCH 1/2] tests: do not download all PG versions to reduce CI time --- .github/workflows/main.yml | 14 +++++++------- flake.lock | 8 ++++---- shell.nix | 4 +++- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4b93e7f3..e692fa7e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,10 +25,10 @@ jobs: authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - name: Build - run: nix-shell --run "xpg -v ${{ matrix.pg-version }} build" + run: nix-shell --argstr pgVersion "${{ matrix.pg-version }}" --arg cassert false --run "xpg -v ${{ matrix.pg-version }} build" - name: Run tests - run: nix-shell --run "xpg -v ${{ matrix.pg-version }} test" + run: nix-shell --argstr pgVersion "${{ matrix.pg-version }}" --arg cassert false --run "xpg -v ${{ matrix.pg-version }} test" test-on-macos: runs-on: macos-15 @@ -50,10 +50,10 @@ jobs: authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - name: Build - run: nix-shell --run "xpg -v ${{ matrix.pg-version }} build" + run: nix-shell --argstr pgVersion "${{ matrix.pg-version }}" --arg cassert false --run "xpg -v ${{ matrix.pg-version }} build" - name: Run tests - run: nix-shell --run "xpg -v ${{ matrix.pg-version }} test" + run: nix-shell --argstr pgVersion "${{ matrix.pg-version }}" --arg cassert false --run "xpg -v ${{ matrix.pg-version }} test" loadtest: runs-on: ubuntu-latest @@ -78,11 +78,11 @@ jobs: authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - name: Build - run: nix-shell --run "xpg build" + run: nix-shell --argstr pgVersion "17" --arg cassert false --run "xpg build" - name: Run load test run: | - nix-shell --run "net-loadtest ${{ matrix.params.reqs }} ${{ matrix.params.batch }}" >> "$GITHUB_STEP_SUMMARY" + nix-shell --argstr pgVersion "17" --arg cassert false --run "net-loadtest ${{ matrix.params.reqs }} ${{ matrix.params.batch }}" >> "$GITHUB_STEP_SUMMARY" coverage: runs-on: ubuntu-latest @@ -104,7 +104,7 @@ jobs: authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - name: Coverage - run: nix-shell --run "xpg -v ${{ matrix.pg-version }} coverage" + run: nix-shell --argstr pgVersion "${{ matrix.pg-version }}" --arg cassert false --run "xpg -v ${{ matrix.pg-version }} coverage" - name: Send coverage to Coveralls uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6 diff --git a/flake.lock b/flake.lock index fa6f807a..27c3a698 100644 --- a/flake.lock +++ b/flake.lock @@ -43,11 +43,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1782266378, - "narHash": "sha256-moRjdGvymGEyREU4++qpNzDuUN+nVC69CUYjhuY4Yzs=", - "owner": "steve-chavez", + "lastModified": 1785519554, + "narHash": "sha256-DDIeJCHRtmvB7yocWTo1MISIGf0DsUmyLw6ISuEV4e0=", + "owner": "imor", "repo": "xpg", - "rev": "d81725666a193c644fe0db96a988ece66edf460c", + "rev": "c59ee9337c0b036a0be3ff4184626c344a818f4a", "type": "github" }, "original": { diff --git a/shell.nix b/shell.nix index eecd3d51..ee568e9b 100644 --- a/shell.nix +++ b/shell.nix @@ -14,6 +14,8 @@ in inherit (xpgLock) owner repo rev; sha256 = xpgLock.narHash; }) +, pgVersion ? null +, cassert ? true }: let nginxCustom = pkgs.callPackage ./nix/nginxCustom.nix {}; @@ -36,7 +38,7 @@ in pkgs.mkShell { buildInputs = [ - xpgPkgs.xpg + (if pgVersion == null then xpgPkgs.xpg else xpgPkgs.xpg.forVersions { versions = [ pgVersion ]; inherit cassert; }) pythonDeps nginxCustom.nginxScript pkgs.curlWithGnuTls From 0d7b3786475ffb3235c853b827fec0a49686aa24 Mon Sep 17 00:00:00 2001 From: Raminder Singh Date: Sat, 1 Aug 2026 09:39:41 +0530 Subject: [PATCH 2/2] chore: update xpg version to 2.5.0 --- flake.lock | 8 ++++---- flake.nix | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index 27c3a698..86062f8c 100644 --- a/flake.lock +++ b/flake.lock @@ -43,16 +43,16 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1785519554, + "lastModified": 1785529904, "narHash": "sha256-DDIeJCHRtmvB7yocWTo1MISIGf0DsUmyLw6ISuEV4e0=", - "owner": "imor", + "owner": "steve-chavez", "repo": "xpg", - "rev": "c59ee9337c0b036a0be3ff4184626c344a818f4a", + "rev": "e7d47eb58f19168b5facc6b78a64f6cc7f04bbcb", "type": "github" }, "original": { "owner": "steve-chavez", - "ref": "v2.4.0", + "ref": "v2.5.0", "repo": "xpg", "type": "github" } diff --git a/flake.nix b/flake.nix index a906059f..f12922de 100644 --- a/flake.nix +++ b/flake.nix @@ -5,7 +5,7 @@ # 2025-11-13 nixpkgs.url = "github:NixOS/nixpkgs/91c9a64ce2a84e648d0cf9671274bb9c2fb9ba60"; xpg = { - url = "github:steve-chavez/xpg/v2.4.0"; + url = "github:steve-chavez/xpg/v2.5.0"; }; };