Skip to content

Commit

Permalink
Merge branch 'main' into fix-attrs-provides
Browse files Browse the repository at this point in the history
  • Loading branch information
hacklschorsch committed Nov 4, 2024
2 parents fb89e91 + 999c7c0 commit 20ab993
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 34 deletions.
63 changes: 45 additions & 18 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,31 @@ orbs:
win: "circleci/[email protected]"

aliases:
# Custom checkout step using https URL instead of the ssh one provided by GitHub OAuth
# This avoids us having to manage keys only to read a public repo - until we have to push?
# But we have to handle remote branches from external fork (CIRCLE_PR_XXX)
# and local branches from the project itself (CIRCLE_PROJECT)
# In addition, the code will differ between bash and powershell
- &CHECKOUT
run:
name: Checkout code
command: |
USERNAME=${CIRCLE_PR_USERNAME:-${CIRCLE_PROJECT_USERNAME}}
REPONAME=${CIRCLE_PR_REPONAME:-${CIRCLE_PROJECT_REPONAME}}
git clone "https://github.com/${USERNAME}/${REPONAME}.git" .
git checkout -B "${CIRCLE_BRANCH}" "${CIRCLE_SHA1}"
TERM=ansi git log -n 1 --pretty=oneline
- &CHECKOUT_WINDOWS
run:
name: Checkout code
command: |
$USERNAME = if ($Env:CIRCLE_PR_USERNAME -ne $null) { $Env:CIRCLE_PR_USERNAME } else { $Env:CIRCLE_PROJECT_USERNAME }
$REPONAME = if ($Env:CIRCLE_PR_REPONAME -ne $null) { $Env:CIRCLE_PR_REPONAME } else { $Env:CIRCLE_PROJECT_REPONAME }
git clone "https://github.com/$USERNAME/$REPONAME.git" .
git checkout -B "$Env:CIRCLE_BRANCH" "$Env:CIRCLE_SHA1"
git log -n 1 --pretty=oneline
- &PREPARE_VIRTUALENV
run:
name: "Prepare virtualenv"
Expand Down Expand Up @@ -55,7 +80,7 @@ jobs:
PIP_REQUIREMENTS: "-r docs/requirements.txt"

steps:
- "checkout"
- <<: *CHECKOUT

- <<: *PREPARE_VIRTUALENV

Expand All @@ -81,15 +106,16 @@ jobs:
size: "medium"
# The default Windows machine image changes from time to time - which
# often breaks things. Avoid that.
version: "2022.08.1"
version: "2024.04.1"

steps:
# Commands are run in a Windows virtual machine environment
- "checkout"
- <<: *CHECKOUT_WINDOWS
- run:
name: "Setup Environment"
command: |
py --list
py -<< parameters.py-version >> -c "# This err-exits if no Python of this version is installed"
if (-not $?) { choco install python --version=<< parameters.py-version >> --confirm --allow-downgrade }
py -<< parameters.py-version >> -V
py -<< parameters.py-version >> -m pip install -v --upgrade pip wheel
py -<< parameters.py-version >> -m pip install -v . -r requirements/test.in
Expand Down Expand Up @@ -127,7 +153,7 @@ jobs:
xcode: << parameters.xcode-version >>

steps:
- "checkout"
- <<: *CHECKOUT

- run:
name: "Install Python"
Expand Down Expand Up @@ -254,7 +280,7 @@ jobs:
# The only reason we need the source for this step is to get
# nix/twine.nix that defines the shell environment we can use to upload
# the wheel.
- "checkout"
- <<: *CHECKOUT

- attach_workspace:
at: "release-workspace"
Expand Down Expand Up @@ -283,7 +309,7 @@ jobs:
<<: *NIX_ENVIRON

steps:
- "checkout"
- <<: *CHECKOUT
- run:
name: "Build Wheel"
command: |
Expand Down Expand Up @@ -335,7 +361,7 @@ jobs:
# instead of building it locally, if possible.
cachix use "${CACHIX_NAME}"
- "checkout"
- <<: *CHECKOUT

- run:
name: "Run Test Suite"
Expand Down Expand Up @@ -376,7 +402,7 @@ jobs:
steps:
- run:
<<: *SETUP_CACHIX
- "checkout"
- <<: *CHECKOUT

- run:
name: "Check Black"
Expand Down Expand Up @@ -409,7 +435,7 @@ jobs:
- <<: *NIX_DOCKER

steps:
- "checkout"
- <<: *CHECKOUT
- attach_workspace:
at: "coverage-workspace"

Expand Down Expand Up @@ -481,7 +507,7 @@ workflows:
- "documentation"
- "typecheck":
py-version: "39"
tahoe-lafs: "1_17_1"
tahoe-lafs: "1_18_0"
- "build-wheel"
- "linux-tests":
matrix:
Expand All @@ -490,7 +516,6 @@ workflows:
- "39"
- "310"
tahoe-lafs:
- "1_17_1"
- "1_18_0"
# This is usually not master@HEAD because it is still pinned to
# a certain revision. The intent is to update it frequently and
Expand All @@ -499,31 +524,33 @@ workflows:
# going into a release.
- "dev"

# https://circleci.com/docs/2.0/testing-ios/#supported-xcode-versions
# https://circleci.com/docs/using-macos/
- "macos-tests":
matrix:
parameters:
py-version:
- "3.9"
- "3.10"
xcode-version:
- "12.5.1"
- "13.4.1"

- "windows-tests":
matrix:
parameters:
py-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"

- "finish-coverage":
# Make sure it depends on all coverage-collecting jobs!
requires:
- "linux-tests-39-1_17_1"
- "linux-tests-39-1_18_0"
- "linux-tests-39-dev"
- "linux-tests-310-1_17_1"
- "linux-tests-310-1_18_0"
- "linux-tests-310-dev"
- "macos-tests-3.9-12.5.1"
- "macos-tests-3.10-12.5.1"
- "macos-tests-3.9-13.4.1"
- "macos-tests-3.10-13.4.1"
- "windows-tests-3.9"
- "windows-tests-3.10"
14 changes: 0 additions & 14 deletions nix/tahoe-versions.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@
# each element describing one version of Tahoe-LAFS we can build against.
{ fetchPypi, tahoe-lafs-dev }:
let
v1_17_1 = fetchPypi {
pname = "tahoe-lafs";
version = "1.17.1";
sha256 = "sha256-Lcf8ED/g5Pn8aZU5NAifVeRCi9XZRnDoROZMIQ18FnI=";
};

v1_18_0 = fetchPypi {
pname = "tahoe-lafs";
version = "1.18.0";
Expand All @@ -20,14 +14,6 @@ in
# by Nix to select set attributes and end up require annoying quoting in
# command line usage. Avoid that by using a different component separator
# (`_`).
version = "1_17_1";
buildArgs = {
version = "1.17.1";
src = v1_17_1;
};
}

{
version = "1_18_0";
buildArgs = {
version = "1.18.0";
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ install_requires =
# basically no wiggle room here. We use a tiny range that just covers
# what we test plus a little because our Nix packaging provides a
# Tahoe-LAFS with a .postNNN version.
tahoe-lafs >=1.17.1,<1.18.1
tahoe-lafs >=1.18.0,<1.18.1
treq
pyutil
prometheus-client
Expand Down
2 changes: 1 addition & 1 deletion src/_zkapauthorizer/tests/test_client_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ class RecoverTests(TestCase):
# testtools and Twisted both observe the log then we have to do all of
# that work twice, once for each system.
run_tests_with = AsynchronousDeferredRunTest.make_factory(
timeout=60.0, suppress_twisted_logging=True
timeout=90.0, suppress_twisted_logging=True
)

@given(
Expand Down

0 comments on commit 20ab993

Please sign in to comment.