sync #73
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: run pytests | |
on: | |
[push,pull_request,workflow_dispatch] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
build_wheels: | |
name: Build wheel for ${{ matrix.python-version }}-${{ matrix.buildplat[1] }} | |
if: >- | |
github.event_name == 'schedule' || | |
github.event_name == 'workflow_dispatch' || | |
(github.event_name == 'pull_request' && | |
contains(github.event.pull_request.labels.*.name, 'Build System')) | |
runs-on: ${{ matrix.buildplat[0] }} | |
strategy: | |
# Ensure that a wheel builder finishes even if another fails | |
fail-fast: false | |
matrix: | |
# Github Actions doesn't support pairing matrix values together, let's improvise | |
# https://github.com/github/feedback/discussions/7835#discussioncomment-1769026 | |
buildplat: | |
- [ ubuntu-20.04, ubuntu-20.04 ] | |
- [ macos-10.15, macosx_10 ] | |
- [ macos-11, macosx_11 ] | |
- [ macos-12, macosx_12 ] | |
- [ windows-2019, windows-2019 ] | |
- [ windows-2022, windows-2022 ] | |
# spacy doesn't compile win32 | |
# python: ["cp36"] # Note: Wheels not needed for PyPy | |
python-version: [ "3.6", "3.7", "3.8", "3.9","3.10.x","3.11.x"] # Note: Wheels not needed for PyPy | |
timeout-minutes: 45 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: set up python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
cache-dependency-path: 'requirements.txt' | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install pytest | |
- name: pytests | |
run: | | |
python --version | |
pip install ./ | |
pytest tests | |