From 24590226b4ebf757f31dbb11b8db143873e99d7e Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone Date: Tue, 14 Mar 2023 17:22:11 +0000 Subject: [PATCH] Run the integration tests on CircleCI --- .circleci/config.yml | 64 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2edd88607..eb9bcf33c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -95,7 +95,6 @@ workflows: - "python38" - "python39" - "python310" - - "python311" - "nixos": name: "<>" @@ -105,6 +104,24 @@ workflows: pythonVersion: - "python311" + - "nixos-integration": + name: "Integration (NixOS)" + requires: + - "python311" + nixpkgs: "unstable" + pythonVersion: "python311" + forceFoolscap: false + runSlow: true + + - "nixos-integration": + name: "Integration (Foolscap)" + requires: + - "python311" + nixpkgs: "unstable" + pythonVersion: "python311" + forceFoolscap: true + runSlow: false + # Eventually, test against PyPy 3.8 #- "pypy27-buster": # {} @@ -412,6 +429,51 @@ jobs: --argstr pythonVersion "<>" \ nix/unittests.nix + nixos-integration: + parameters: + nixpkgs: + description: >- + Reference the name of a niv-managed nixpkgs source (see `niv show` + and nix/sources.json) + type: "string" + pythonVersion: + description: >- + Reference the name of a Python package in nixpkgs to use. + type: "string" + forceFoolscap: + description: >- + If true, force nodes to communicate using Foolscap. Otherwise, let + them negotiate a protocol. + type: "boolean" + runSlow: + description: >- + Also run integration tests marked as slow. + type: "boolean" + + executor: "nix" + + steps: + - "nix-build": + nixpkgs: "<>" + pythonVersion: "<>" + buildSteps: + - "run": + name: "Integration Test" + command: | + # CircleCI build environment looks like it has a zillion and + # a half cores. Don't let Nix autodetect this high core + # count because it blows up memory usage and fails the test + # run. Pick a number of cores that suits the build + # environment we're paying for (the free one!). + source .circleci/lib.sh + cache_if_able nix-build \ + --cores 8 \ + --argstr pkgsVersion "nixpkgs-<>" \ + --argstr pythonVersion "<>" \ + --arg forceFoolscap "<>" \ + --arg runSlow "<>" \ + nix/integrationtests.nix + typechecks: docker: - <<: *DOCKERHUB_AUTH