Update tests.yml to run python 3.7 tests on legacy version macOS #51
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: tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
python-version: ["3.7", "3.10"] | |
exclude: # Python < v3.8 does not support Apple Silicon ARM64. | |
- python-version: "3.7" | |
os: macos-latest | |
include: # So run those legacy versions on Intel CPUs. | |
- python-version: "3.7" | |
os: macos-13 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
cache-dependency-path: setup.py | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytest | |
pip install -e . | |
- name: Setup display | |
if: runner.os == 'Linux' | |
run: | | |
export DISPLAY=:0.0 | |
Xvfb :0 -screen 0 640x480x24 & | |
- name: Run tests | |
run: | | |
cd tests | |
pytest |