From 8ab5f4840e32e44cf9927115e34f74a0041bc044 Mon Sep 17 00:00:00 2001 From: Nathan Goldbaum Date: Thu, 16 Jan 2025 10:50:05 -0700 Subject: [PATCH 1/5] attempt to fix tox on bcrypt CI --- .github/workflows/ci.yml | 45 +++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 09844a2d..20cf2049 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: PYTHON: - {VERSION: "3.8", TOXENV: "py38"} - {VERSION: "3.13", TOXENV: "py313"} - - {VERSION: "3.13t", TOXENV: "py313"} + - {VERSION: "3.13t", TOXENV: "py313t"} MACOS: - macos-13 - macos-latest @@ -39,9 +39,8 @@ jobs: src/_bcrypt/target/ key: ${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-cargo-${{ hashFiles('**/Cargo.lock') }} - run: pip install tox - - run: tox + - run: tox --discover $(which python) env: - TOXENV: ${{ matrix.PYTHON.TOXENV }} CARGO_TARGET_DIR: ${{ format('{0}/src/_bcrypt/target/', github.workspace) }} windows: @@ -52,9 +51,9 @@ jobs: - {ARCH: 'x86', WINDOWS: 'win32', RUST_TRIPLE: 'i686-pc-windows-msvc'} - {ARCH: 'x64', WINDOWS: 'win64', RUST_TRIPLE: 'x86_64-pc-windows-msvc'} PYTHON: - - {VERSION: "3.8", TOXENV: "py38"} - - {VERSION: "3.13", TOXENV: "py313"} - - {VERSION: "3.13t", TOXENV: "py313"} + - {VERSION: "3.8"} + - {VERSION: "3.13"} + - {VERSION: "3.13t"} name: "Python ${{ matrix.PYTHON.VERSION }} on ${{ matrix.WINDOWS.WINDOWS }}" steps: - uses: actions/checkout@v4.2.2 @@ -77,31 +76,30 @@ jobs: key: ${{ runner.os }}-${{ matrix.WINDOWS.ARCH }}-${{ steps.setup-python.outputs.python-version }}-cargo-${{ hashFiles('**/Cargo.lock') }} - run: pip install tox - - run: tox + - run: tox --discover $(which python) env: - TOXENV: ${{ matrix.PYTHON.TOXENV }} CARGO_TARGET_DIR: ${{ format('{0}/src/_bcrypt/target/', github.workspace) }} linux: runs-on: ubuntu-22.04 strategy: matrix: PYTHON: - - {VERSION: "3.13", TOXENV: "pep8,packaging"} - - {VERSION: "3.13", TOXENV: "mypy"} - - {VERSION: "3.8", TOXENV: "py38"} - - {VERSION: "3.9", TOXENV: "py39"} - - {VERSION: "3.10", TOXENV: "py310"} - - {VERSION: "3.11", TOXENV: "py311"} - - {VERSION: "3.12", TOXENV: "py312"} - - {VERSION: "3.13", TOXENV: "py313"} - - {VERSION: "3.13t", TOXENV: "py313"} - - {VERSION: "pypy-3.9", TOXENV: "pypy3"} - - {VERSION: "pypy-3.10", TOXENV: "pypy3"} + - {VERSION: "3.13"} + - {VERSION: "3.13"} + - {VERSION: "3.8"} + - {VERSION: "3.9"} + - {VERSION: "3.10"} + - {VERSION: "3.11"} + - {VERSION: "3.12"} + - {VERSION: "3.13"} + - {VERSION: "3.13t"} + - {VERSION: "pypy-3.9"} + - {VERSION: "pypy-3.10"} # MSRV - - {VERSION: "3.13", TOXENV: "py313", RUST_VERSION: "1.64.0"} - - {VERSION: "3.13", TOXENV: "py313", RUST_VERSION: "beta"} - - {VERSION: "3.13", TOXENV: "py313", RUST_VERSION: "nightly"} + - {VERSION: "3.13", RUST_VERSION: "1.64.0"} + - {VERSION: "3.13", RUST_VERSION: "beta"} + - {VERSION: "3.13", RUST_VERSION: "nightly"} name: "${{ matrix.PYTHON.VERSION }} on linux, Rust ${{ matrix.PYTHON.RUST_VERSION || 'stable' }}" steps: - uses: actions/checkout@v4.2.2 @@ -126,9 +124,8 @@ jobs: toolchain: ${{ matrix.PYTHON.RUST_VERSION || 'stable' }} - run: pip install tox - - run: tox + - run: tox --discover $(which python) env: - TOXENV: ${{ matrix.PYTHON.TOXENV }} CARGO_TARGET_DIR: ${{ format('{0}/src/_bcrypt/target/', github.workspace) }} linux-distros: From a591dc6a70217f0d18d088d39d1a0f782416a831 Mon Sep 17 00:00:00 2001 From: Nathan Goldbaum Date: Thu, 16 Jan 2025 11:20:36 -0700 Subject: [PATCH 2/5] fix mypy, pep8, and packaging environments --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 20cf2049..a3c5c5f1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,8 +84,8 @@ jobs: strategy: matrix: PYTHON: - - {VERSION: "3.13"} - - {VERSION: "3.13"} + - {VERSION: "3.13", TOXENV: "pep8,packaging"} + - {VERSION: "3.13", TOXENV: "mypy"} - {VERSION: "3.8"} - {VERSION: "3.9"} - {VERSION: "3.10"} From 9377ea6882c7c3a80596f33113140911c3499911 Mon Sep 17 00:00:00 2001 From: Nathan Goldbaum Date: Thu, 16 Jan 2025 11:28:02 -0700 Subject: [PATCH 3/5] delete Mac CI TOXENV uses as well --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a3c5c5f1..5597c622 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,9 +14,9 @@ jobs: fail-fast: false matrix: PYTHON: - - {VERSION: "3.8", TOXENV: "py38"} - - {VERSION: "3.13", TOXENV: "py313"} - - {VERSION: "3.13t", TOXENV: "py313t"} + - {VERSION: "3.8"} + - {VERSION: "3.13"} + - {VERSION: "3.13t"} MACOS: - macos-13 - macos-latest From de1f056e9d89f9bac8294248f6a6600f2c92535a Mon Sep 17 00:00:00 2001 From: Nathan Goldbaum Date: Thu, 16 Jan 2025 11:35:18 -0700 Subject: [PATCH 4/5] restore setting TOXENV in linux CI --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5597c622..d367affc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -126,6 +126,7 @@ jobs: - run: pip install tox - run: tox --discover $(which python) env: + TOXENV: ${{ matrix.PYTHON.TOXENV }} CARGO_TARGET_DIR: ${{ format('{0}/src/_bcrypt/target/', github.workspace) }} linux-distros: From 236a006e1788d2208ed3bf87267dca8e95591bf1 Mon Sep 17 00:00:00 2001 From: Nathan Goldbaum Date: Thu, 16 Jan 2025 11:38:17 -0700 Subject: [PATCH 5/5] use TOXENV in environment name if defined --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d367affc..5e913a97 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -100,7 +100,7 @@ jobs: - {VERSION: "3.13", RUST_VERSION: "1.64.0"} - {VERSION: "3.13", RUST_VERSION: "beta"} - {VERSION: "3.13", RUST_VERSION: "nightly"} - name: "${{ matrix.PYTHON.VERSION }} on linux, Rust ${{ matrix.PYTHON.RUST_VERSION || 'stable' }}" + name: "${{ matrix.PYTHON.TOXENV || matrix.PYTHON.VERSION }} on linux, Rust ${{ matrix.PYTHON.RUST_VERSION || 'stable' }}" steps: - uses: actions/checkout@v4.2.2 - name: Setup python