From 4adc9aaa4922cc1b92e49bd4d90bc617bdfe8d85 Mon Sep 17 00:00:00 2001 From: Adrian Zawadzki Date: Wed, 26 Nov 2025 09:45:08 +0100 Subject: [PATCH] modified actions --- .github/workflows/build-and-deploy.yml | 123 ++---------- .../workflows/build-and-test-with-asan.yml | 58 +----- .github/workflows/build-and-test.yml | 86 ++------ .github/workflows/build-linux-wheel.yml | 79 ++++++++ .github/workflows/build-windows-wheel.yml | 92 +++++++++ .github/workflows/test-all-versions.yml | 186 ++++++++++++++++++ .github/workflows/test-linux-wheel.yml | 76 +++++++ .github/workflows/test-windows-wheel.yml | 49 +++++ 8 files changed, 517 insertions(+), 232 deletions(-) create mode 100644 .github/workflows/build-linux-wheel.yml create mode 100644 .github/workflows/build-windows-wheel.yml create mode 100644 .github/workflows/test-all-versions.yml create mode 100644 .github/workflows/test-linux-wheel.yml create mode 100644 .github/workflows/test-windows-wheel.yml diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 384c7b10..ba84a70e 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -8,7 +8,6 @@ on: jobs: wheels-windows: - runs-on: windows-latest strategy: fail-fast: false matrix: @@ -28,81 +27,22 @@ jobs: - python-version: "3.14" python-tag: "314" architecture: "AMD64" - - - - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - uses: bus1/cabuild/action/msdevshell@v1 - with: - architecture: x64 - if: matrix.architecture == 'AMD64' - - uses: bus1/cabuild/action/msdevshell@v1 - with: - architecture: x86 - if: matrix.architecture == 'x86' - - name: Generate meson files - run: | - python scripts/generate_meson.py ./src/dbzero/ core - python scripts/generate_meson_tests.py tests/ - python scripts/generate_meson_dbzero.py dbzero/ - - - name: Configure git - run: | - git config --global user.email "ci@example.com" - git config --global user.name "CI Builder" - rm .gitignore - git add . && git commit -m "Update meson files for build" - - - run: pip3 install pipx - - run: pipx run cibuildwheel - env: - CIBW_BUILD: cp${{ matrix.python-tag }}-* - CIBW_ARCHS_WINDOWS: ${{ matrix.architecture }} - - uses: actions/upload-artifact@v4 - with: - name: wheels-windows-${{ matrix.python-version }} - path: wheelhouse/*.whl + uses: ./.github/workflows/build-windows-wheel.yml + with: + python-version: ${{ matrix.python-version }} + python-tag: ${{ matrix.python-tag }} + architecture: ${{ matrix.architecture }} wheels-linux: - runs-on: ubuntu-latest strategy: fail-fast: false matrix: python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - uses: actions/checkout@v3 - - run: python3 scripts/generate_meson.py ./src/dbzero/ core - - run: python3 scripts/generate_meson_tests.py tests/ - - run: python3 scripts/generate_meson_dbzero.py dbzero/ - - run: git config --global user.email "you@example.com" - - run: git config --global user.name "Your Name" - - run: rm .gitignore - - run: git add . && git commit -m "Update meson files" - - run: pip install build - - run: python3 -m build - env: - CIBW_SKIP: pp* cp36-* *-musllinux* - CIBW_ARCHS_MACOS: x86_64 arm64 - CIBW_ARCHS_LINUX: x86_64 aarch64 - CIBW_ARCHS_WINDOWS: ${{ matrix.architecture }} - - - uses: actions/upload-artifact@v4 - with: - name: wheels-linux-${{ matrix.python-version }} - path: dist/*.whl + uses: ./.github/workflows/build-linux-wheel.yml + with: + python-version: ${{ matrix.python-version }} test-wheels-windows: - runs-on: windows-latest needs: wheels-windows strategy: fail-fast: false @@ -123,54 +63,19 @@ jobs: - python-version: "3.14" python-tag: "314" architecture: "AMD64" - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - name: Download wheel artifact - uses: actions/download-artifact@v4 - with: - name: wheels-windows-${{ matrix.python-version }} - path: ./wheels/ - - name: Install wheel and dependencies - run: | - pip install pytest - pip install -r requirements.txt - Get-ChildItem -Path "./wheels/*.whl" | ForEach-Object { pip install $_.FullName } - shell: powershell - - name: Run tests - run: | - python -m pytest -m 'not integration_test' -m 'not stress_test' -c pytest.ini --capture=no -vv + uses: ./.github/workflows/test-windows-wheel.yml + with: + python-version: ${{ matrix.python-version }} test-wheels-linux: - runs-on: ubuntu-latest needs: wheels-linux strategy: fail-fast: false matrix: python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] - - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - name: Download wheel artifact - uses: actions/download-artifact@v4 - with: - name: wheels-linux-${{ matrix.python-version }} - path: ./wheels/ - - name: Install wheel and dependencies - run: | - pip install pytest - pip install -r requirements.txt - pip install ./wheels/*.whl - - name: Run tests - run: | - python -m pytest -m 'not integration_test' -m 'not stress_test' -c pytest.ini --capture=no -vv + uses: ./.github/workflows/test-linux-wheel.yml + with: + python-version: ${{ matrix.python-version }} sdist: runs-on: ubuntu-latest diff --git a/.github/workflows/build-and-test-with-asan.yml b/.github/workflows/build-and-test-with-asan.yml index 31a8702d..e653f12a 100644 --- a/.github/workflows/build-and-test-with-asan.yml +++ b/.github/workflows/build-and-test-with-asan.yml @@ -4,65 +4,23 @@ on: jobs: build-linux: - runs-on: ubuntu-latest - timeout-minutes: 60 strategy: fail-fast: false matrix: python-version: ["3.12"] - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - uses: actions/checkout@v3 - - run: python3 scripts/generate_meson.py ./src/dbzero/ core - - run: python3 scripts/generate_meson_tests.py tests/ - - run: python3 scripts/generate_meson_dbzero.py dbzero/ - - run: git config --global user.email "you@example.com" - - run: git config --global user.name "Your Name" - - run: rm .gitignore - - run: git add . && git commit -m "Update meson files" - - run: pip install build - - run: python3 -m build --config-setting=setup-args=-Denable_sanitizers=true - env: - CIBW_SKIP: pp* cp36-* *-musllinux* - CIBW_ARCHS_MACOS: x86_64 arm64 - CIBW_ARCHS_LINUX: x86_64 aarch64 - CIBW_ARCHS_WINDOWS: ${{ matrix.architecture }} - - - uses: actions/upload-artifact@v4 - with: - name: wheels-linux-${{ matrix.python-version }} - path: dist/*.whl + uses: ./.github/workflows/build-linux-wheel.yml + with: + python-version: ${{ matrix.python-version }} + build-args: '--config-setting=setup-args=-Denable_sanitizers=true' test-wheels-linux: - runs-on: ubuntu-latest - timeout-minutes: 15 needs: build-linux strategy: fail-fast: false matrix: python-version: ["3.12"] - - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - name: Download wheel artifact - uses: actions/download-artifact@v4 - with: - name: wheels-linux-${{ matrix.python-version }} - path: ./wheels/ - - name: Install wheel and dependencies - run: | - pip install pytest - pip install -r requirements.txt - pip install ./wheels/*.whl - - name: Run tests - run: | - LD_PRELOAD=$(gcc -print-file-name=libasan.so) python -m pytest -m 'not integration_test' -m 'not stress_test' -c pytest.ini --capture=no -vv + uses: ./.github/workflows/test-linux-wheel.yml + with: + python-version: ${{ matrix.python-version }} + ld-preload: 'LD_PRELOAD=$(gcc -print-file-name=libasan.so)' diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index ec80ad75..8f9a70a0 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -8,93 +8,33 @@ on: jobs: build-linux: - runs-on: ubuntu-latest - timeout-minutes: 60 strategy: fail-fast: false matrix: python-version: ["3.12"] - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - uses: actions/checkout@v3 - - run: python3 scripts/generate_meson.py ./src/dbzero/ core - - run: python3 scripts/generate_meson_tests.py tests/ - - run: python3 scripts/generate_meson_dbzero.py dbzero/ - - run: git config --global user.email "you@example.com" - - run: git config --global user.name "Your Name" - - run: rm .gitignore - - run: git add . && git commit -m "Update meson files" - - run: pip install build - - run: python3 -m build - env: - CIBW_SKIP: pp* cp36-* *-musllinux* - CIBW_ARCHS_MACOS: x86_64 arm64 - CIBW_ARCHS_LINUX: x86_64 aarch64 - CIBW_ARCHS_WINDOWS: ${{ matrix.architecture }} - - - uses: actions/upload-artifact@v4 - with: - name: wheels-linux-${{ matrix.python-version }} - path: dist/*.whl + uses: ./.github/workflows/build-linux-wheel.yml + with: + python-version: ${{ matrix.python-version }} test-wheels-linux: - runs-on: ubuntu-latest - timeout-minutes: 15 needs: build-linux strategy: fail-fast: false matrix: python-version: ["3.12"] - - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - name: Download wheel artifact - uses: actions/download-artifact@v4 - with: - name: wheels-linux-${{ matrix.python-version }} - path: ./wheels/ - - name: Install wheel and dependencies - run: | - pip install pytest - pip install -r requirements.txt - pip install ./wheels/*.whl - - name: Run tests - run: | - python -m pytest -m 'not integration_test' -m 'not stress_test' -c pytest.ini --capture=no -vv - stress-tests-wheels-linux: - runs-on: ubuntu-latest - timeout-minutes: 15 + uses: ./.github/workflows/test-linux-wheel.yml + with: + python-version: ${{ matrix.python-version }} + + stress-test-linux: needs: build-linux strategy: fail-fast: false matrix: python-version: ["3.12"] - - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - name: Download wheel artifact - uses: actions/download-artifact@v4 - with: - name: wheels-linux-${{ matrix.python-version }} - path: ./wheels/ - - name: Install wheel and dependencies - run: | - pip install pytest - pip install -r requirements.txt - pip install ./wheels/*.whl - - name: Run tests - run: | - python3 -m pytest -m 'stress_test' -c pytest.ini --capture=no -vv -s + uses: ./.github/workflows/test-linux-wheel.yml + with: + python-version: ${{ matrix.python-version }} + pytest-markers: "-m 'stress_test'" + timeout-minutes: 60 diff --git a/.github/workflows/build-linux-wheel.yml b/.github/workflows/build-linux-wheel.yml new file mode 100644 index 00000000..e6703006 --- /dev/null +++ b/.github/workflows/build-linux-wheel.yml @@ -0,0 +1,79 @@ +name: Build Linux Wheel + +on: + workflow_call: + inputs: + python-version: + required: true + type: string + build-args: + required: false + type: string + default: '' + timeout-minutes: + required: false + type: number + default: 60 + workflow_dispatch: + inputs: + python-version: + description: 'Python version to build' + required: true + type: choice + options: + - '3.10' + - '3.11' + - '3.12' + - '3.13' + - '3.14' + default: '3.12' + build-args: + description: 'Additional build arguments (e.g., --config-setting=setup-args=-Denable_sanitizers=true)' + required: false + type: string + default: '' + timeout-minutes: + description: 'Timeout in minutes' + required: false + type: number + default: 60 + +jobs: + build-linux: + runs-on: ubuntu-latest + timeout-minutes: ${{ inputs.timeout-minutes }} + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ inputs.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ inputs.python-version }} + + - name: Generate meson files + run: | + python3 scripts/generate_meson.py ./src/dbzero/ core + python3 scripts/generate_meson_tests.py tests/ + python3 scripts/generate_meson_dbzero.py dbzero/ + + - name: Configure git + run: | + git config --global user.email "ci@example.com" + git config --global user.name "CI Builder" + rm -f .gitignore + git add . && git commit -m "Update meson files" + + - name: Install build tools + run: pip install build + + - name: Build wheel + run: python3 -m build ${{ inputs.build-args }} + env: + CIBW_SKIP: pp* cp36-* *-musllinux* + CIBW_ARCHS_MACOS: x86_64 arm64 + CIBW_ARCHS_LINUX: x86_64 aarch64 + + - uses: actions/upload-artifact@v4 + with: + name: wheels-linux-${{ inputs.python-version }} + path: dist/*.whl diff --git a/.github/workflows/build-windows-wheel.yml b/.github/workflows/build-windows-wheel.yml new file mode 100644 index 00000000..8160d52e --- /dev/null +++ b/.github/workflows/build-windows-wheel.yml @@ -0,0 +1,92 @@ +name: Build Windows Wheel + +on: + workflow_call: + inputs: + python-version: + required: true + type: string + python-tag: + required: true + type: string + architecture: + required: true + type: string + workflow_dispatch: + inputs: + python-version: + description: 'Python version to build' + required: true + type: choice + options: + - '3.10' + - '3.11' + - '3.12' + - '3.13' + - '3.14' + default: '3.12' + python-tag: + description: 'Python tag (e.g., 310, 311, 312)' + required: true + type: choice + options: + - '310' + - '311' + - '312' + - '313' + - '314' + default: '312' + architecture: + description: 'Build architecture' + required: true + type: choice + options: + - 'AMD64' + - 'x86' + default: 'AMD64' + +jobs: + build-windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ inputs.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ inputs.python-version }} + + - uses: bus1/cabuild/action/msdevshell@v1 + with: + architecture: x64 + if: inputs.architecture == 'AMD64' + + - uses: bus1/cabuild/action/msdevshell@v1 + with: + architecture: x86 + if: inputs.architecture == 'x86' + + - name: Generate meson files + run: | + python scripts/generate_meson.py ./src/dbzero/ core + python scripts/generate_meson_tests.py tests/ + python scripts/generate_meson_dbzero.py dbzero/ + + - name: Configure git + run: | + git config --global user.email "ci@example.com" + git config --global user.name "CI Builder" + rm .gitignore + git add . && git commit -m "Update meson files for build" + + - run: pip3 install pipx + + - run: pipx run cibuildwheel + env: + CIBW_BUILD: cp${{ inputs.python-tag }}-* + CIBW_ARCHS_WINDOWS: ${{ inputs.architecture }} + + - uses: actions/upload-artifact@v4 + with: + name: wheels-windows-${{ inputs.python-version }} + path: wheelhouse/*.whl diff --git a/.github/workflows/test-all-versions.yml b/.github/workflows/test-all-versions.yml new file mode 100644 index 00000000..c59e6727 --- /dev/null +++ b/.github/workflows/test-all-versions.yml @@ -0,0 +1,186 @@ +name: Test All Versions + +on: + workflow_dispatch: + schedule: + # Run daily at 2 AM UTC + - cron: '0 2 * * *' + +jobs: + build-linux-asan: + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] + uses: ./.github/workflows/build-linux-wheel.yml + with: + python-version: ${{ matrix.python-version }} + build-args: '--config-setting=setup-args=-Denable_sanitizers=true' + timeout-minutes: 60 + + build-windows: + strategy: + fail-fast: false + matrix: + include: + - python-version: "3.10" + python-tag: "310" + - python-version: "3.11" + python-tag: "311" + - python-version: "3.12" + python-tag: "312" + - python-version: "3.13" + python-tag: "313" + - python-version: "3.14" + python-tag: "314" + uses: ./.github/workflows/build-windows-wheel.yml + with: + python-version: ${{ matrix.python-version }} + python-tag: ${{ matrix.python-tag }} + architecture: 'AMD64' + + test-linux-unit-asan: + needs: build-linux-asan + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Download wheel artifact + uses: actions/download-artifact@v4 + with: + name: wheels-linux-${{ matrix.python-version }} + path: ./wheels/ + + - name: Install wheel and dependencies + run: | + pip install pytest + pip install -r requirements.txt + pip install ./wheels/*.whl + + - name: Run unit tests with ASAN + run: | + LD_PRELOAD=$(gcc -print-file-name=libasan.so) python -m pytest -m 'not integration_test' -m 'not stress_test' -c pytest.ini --capture=no -vv + + test-linux-stress-asan: + needs: build-linux-asan + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Download wheel artifact + uses: actions/download-artifact@v4 + with: + name: wheels-linux-${{ matrix.python-version }} + path: ./wheels/ + + - name: Install wheel and dependencies + run: | + pip install pytest + pip install -r requirements.txt + pip install ./wheels/*.whl + + - name: Run stress tests with ASAN + run: | + LD_PRELOAD=$(gcc -print-file-name=libasan.so) python -m pytest -m 'stress_test' -c pytest.ini --capture=no -vv + + test-windows-unit: + needs: build-windows + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] + runs-on: windows-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Download wheel artifact + uses: actions/download-artifact@v4 + with: + name: wheels-windows-${{ matrix.python-version }} + path: ./wheels/ + + - name: Install wheel and dependencies + run: | + pip install pytest + pip install -r requirements.txt + Get-ChildItem -Path "./wheels/*.whl" | ForEach-Object { pip install $_.FullName } + shell: powershell + + - name: Run unit tests + run: | + python -m pytest -m 'not integration_test' -m 'not stress_test' -c pytest.ini --capture=no -vv + + test-windows-stress: + needs: build-windows + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] + runs-on: windows-latest + timeout-minutes: 60 + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Download wheel artifact + uses: actions/download-artifact@v4 + with: + name: wheels-windows-${{ matrix.python-version }} + path: ./wheels/ + + - name: Install wheel and dependencies + run: | + pip install pytest + pip install -r requirements.txt + Get-ChildItem -Path "./wheels/*.whl" | ForEach-Object { pip install $_.FullName } + shell: powershell + + - name: Run stress tests + run: | + python -m pytest -m 'stress_test' -c pytest.ini --capture=no -vv + + summary: + needs: [test-linux-unit-asan, test-linux-stress-asan, test-windows-unit, test-windows-stress] + runs-on: ubuntu-latest + if: always() + steps: + - name: Test Summary + run: | + echo "## Test Results Summary" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "All tests completed across all Python versions (3.10-3.14) on both Linux (with ASAN) and Windows." >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "- Linux Unit Tests: ${{ needs.test-linux-unit-asan.result }}" >> $GITHUB_STEP_SUMMARY + echo "- Linux Stress Tests: ${{ needs.test-linux-stress-asan.result }}" >> $GITHUB_STEP_SUMMARY + echo "- Windows Unit Tests: ${{ needs.test-windows-unit.result }}" >> $GITHUB_STEP_SUMMARY + echo "- Windows Stress Tests: ${{ needs.test-windows-stress.result }}" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/test-linux-wheel.yml b/.github/workflows/test-linux-wheel.yml new file mode 100644 index 00000000..f9bb423b --- /dev/null +++ b/.github/workflows/test-linux-wheel.yml @@ -0,0 +1,76 @@ +name: Test Linux Wheel + +on: + workflow_call: + inputs: + python-version: + required: true + type: string + ld-preload: + required: false + type: string + default: '' + timeout-minutes: + required: false + type: number + default: 15 + pytest-markers: + required: false + type: string + default: "-m 'not integration_test' -m 'not stress_test'" + workflow_dispatch: + inputs: + python-version: + description: 'Python version to test' + required: true + type: choice + options: + - '3.10' + - '3.11' + - '3.12' + - '3.13' + - '3.14' + default: '3.12' + ld-preload: + description: 'LD_PRELOAD value (for ASAN: LD_PRELOAD=$(gcc -print-file-name=libasan.so))' + required: false + type: string + default: '' + timeout-minutes: + description: 'Timeout in minutes' + required: false + type: number + default: 15 + pytest-markers: + description: 'Pytest markers (e.g., -m stress_test)' + required: false + type: string + default: "-m 'not integration_test' -m 'not stress_test'" + +jobs: + test-wheels-linux: + runs-on: ubuntu-latest + timeout-minutes: ${{ inputs.timeout-minutes }} + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ inputs.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ inputs.python-version }} + + - name: Download wheel artifact + uses: actions/download-artifact@v4 + with: + name: wheels-linux-${{ inputs.python-version }} + path: ./wheels/ + + - name: Install wheel and dependencies + run: | + pip install pytest + pip install -r requirements.txt + pip install ./wheels/*.whl + + - name: Run tests + run: | + ${{ inputs.ld-preload }} python -m pytest ${{ inputs.pytest-markers }} -c pytest.ini --capture=no -vv diff --git a/.github/workflows/test-windows-wheel.yml b/.github/workflows/test-windows-wheel.yml new file mode 100644 index 00000000..21c1e72c --- /dev/null +++ b/.github/workflows/test-windows-wheel.yml @@ -0,0 +1,49 @@ +name: Test Windows Wheel + +on: + workflow_call: + inputs: + python-version: + required: true + type: string + workflow_dispatch: + inputs: + python-version: + description: 'Python version to test' + required: true + type: choice + options: + - '3.10' + - '3.11' + - '3.12' + - '3.13' + - '3.14' + default: '3.12' + +jobs: + test-windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ inputs.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ inputs.python-version }} + + - name: Download wheel artifact + uses: actions/download-artifact@v4 + with: + name: wheels-windows-${{ inputs.python-version }} + path: ./wheels/ + + - name: Install wheel and dependencies + run: | + pip install pytest + pip install -r requirements.txt + Get-ChildItem -Path "./wheels/*.whl" | ForEach-Object { pip install $_.FullName } + shell: powershell + + - name: Run tests + run: | + python -m pytest -m 'not integration_test' -m 'not stress_test' -c pytest.ini --capture=no -vv