fixed tests path #3
This file contains 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: Build and publish wheels | |
on: | |
push: | |
branches: | |
- main # Change this to the main branch name, or use 'master' if that's the default branch. | |
jobs: | |
build: | |
name: Build wheel for ${{ matrix.buildplat[1] }} | |
runs-on: ${{ matrix.buildplat[0] }} | |
strategy: | |
matrix: | |
# Github Actions doesn't support pairing matrix values together, let's improvise | |
# https://github.com/github/feedback/discussions/7835#discussioncomment-1769026 | |
buildplat: | |
- [macos-12, macosx_x86_64] | |
- [windows-2019, win_amd64] | |
python: ["cp311"] | |
steps: | |
- uses: actions/checkout@v2 | |
# Used to push the built wheels | |
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 | |
with: | |
python-version: "3.x" | |
- name: Build wheels | |
uses: pypa/cibuildwheel@7da7df1efc530f07d1945c00934b8cfd34be0d50 # v2.16.1 | |
env: | |
CIBW_PRERELEASE_PYTHONS: True | |
CIBW_ARCHS_MACOS: x86_64 arm64 | |
CIBW_ARCHS_WINDOWS: AMD64 | |
CIBW_ARCHS_LINUX: x86_64 | |
CIBW_TEST_REQUIRES: pytest numpy | |
CIBW_TEST_COMMAND: pytest {project}/tests/test_gravitas.py | |
CIBW_TEST_SKIP: "*-macosx_arm64 *-macosx_universal2:arm64" | |
- name: Install Twine | |
run: python -m pip install twine | |
- name: Publish to PyPI | |
if: github.event_name == 'push' | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
run: twine upload wheelhouse/* |