Test macOS Wheel #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test macOS Wheel | |
| on: | |
| workflow_call: | |
| inputs: | |
| python-version: | |
| required: true | |
| type: string | |
| 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.9' | |
| - '3.10' | |
| - '3.11' | |
| - '3.12' | |
| - '3.13' | |
| - '3.14' | |
| default: '3.12' | |
| 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: | |
| build-wheel: | |
| if: github.event_name == 'workflow_dispatch' | |
| uses: ./.github/workflows/build-mac-wheel.yml | |
| with: | |
| python-version: ${{ inputs.python-version }} | |
| timeout-minutes: ${{ fromJSON(inputs.timeout-minutes) }} | |
| test-wheels-macos: | |
| runs-on: macos-latest | |
| needs: [build-wheel] | |
| if: always() && (needs.build-wheel.result == 'success' || needs.build-wheel.result == 'skipped') | |
| timeout-minutes: ${{ fromJSON(inputs.timeout-minutes) }} | |
| env: | |
| REQUIREMENTS_FILE: ${{ inputs.python-version == '3.9' && 'requirements.3.9.txt' || 'requirements.txt' }} | |
| 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-macos-${{ inputs.python-version }} | |
| path: ./wheels/ | |
| - name: Install wheel and dependencies | |
| run: | | |
| pip install pytest | |
| pip install -r $REQUIREMENTS_FILE | |
| pip install ./wheels/*.whl | |
| - name: Run tests | |
| run: | | |
| python -m pytest ${{ inputs.pytest-markers }} -c pytest.ini --capture=no -vv |