Merge pull request #23 from minrk/pre-commit-ci-update-config #52
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: Test | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "*" | |
pull_request: | |
env: | |
FORCE_COLOR: "1" | |
jobs: | |
test: | |
runs-on: ${{ matrix.os || 'macos-latest' }} | |
timeout-minutes: 10 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- macos-latest | |
python: | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
- "3.12" | |
include: | |
# - os: macos-11 | |
# python: "2.7" | |
- os: macos-11 | |
python: "3.6" | |
- os: macos-11 | |
python: "3.7" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: setup python | |
if: matrix.os != 'macos-11.0' | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: setup homebrew python | |
if: matrix.os == 'macos-11.0' | |
run: | | |
brew install python@${{ matrix.python }} | |
env_dir=$(mktemp -d) | |
/usr/local/opt/python@${{ matrix.python }}/bin/python3 -mvenv "$env_dir" | |
echo "PATH=$env_dir/bin:$PATH" >> "$GITHUB_ENV" | |
- name: install dependencies | |
run: | | |
pip install --upgrade pip wheel | |
pip install pytest | |
- name: show environment | |
run: | | |
pip freeze | |
- name: install | |
run: | | |
pip install -v -e . | |
- name: run tests | |
run: | | |
python -m pytest -v |