Skip to content

chore: migrate to hatch #32

chore: migrate to hatch

chore: migrate to hatch #32

Workflow file for this run

name: Tests
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
tests-linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
name: Tests with Python ${{ matrix.python-version }} on Linux
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}-dev
- name: Install dependencies
run: |
pip install hatch
- name: Run tests
timeout-minutes: 10
run: |
hatch run tests.py${{ matrix.python-version }}:tests -svv
- name: Publish coverage metrics
run: |
cd $GITHUB_WORKSPACE/main
hatch run coverage:cov
hatch run coverage:codecov
if: matrix.python-version == '3.10'
env:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
tests-macos:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
name: Tests with Python ${{ matrix.python-version }} on MacOS
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}-dev
- name: Remove signature from the Python binary
run: |
codesign --remove-signature /Library/Frameworks/Python.framework/Versions/${{ matrix.python-version }}/bin/python3 || true
codesign --remove-signature /Library/Frameworks/Python.framework/Versions/${{ matrix.python-version }}/Resources/Python.app/Contents/MacOS/Python || true
- name: Install dependencies
run: |
pip install hatch
- name: Run tests
timeout-minutes: 10
run: |
sudo hatch run tests.py${{ matrix.python-version }}:tests -svv
tests-win:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
name: Tests with Python ${{ matrix.python-version }} on Windows
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}-dev
- name: Install dependencies
run: |
pip install hatch
- name: Run tests
timeout-minutes: 10
run: |
hatch run tests.py${{ matrix.python-version }}:tests -svv