Skip to content

[pre-commit.ci] pre-commit autoupdate #189

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #189

Workflow file for this run

name: CI
on:
push:
pull_request:
jobs:
tests:
strategy:
matrix:
python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest, windows-latest, macos-14]
exclude:
- python_version: "3.9"
os: macos-14
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '${{ matrix.python_version }}'
cache: 'pip'
- run: pip install -e .[test]
- run: pytest --durations=10 --cov=sparseconverter --cov-report=xml --cov-config=setup.cfg tests/
- uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
release:
runs-on: ubuntu-latest
needs: [tests]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Make virtualenv
run: python -m venv venv
- name: Install tooling
run: ./venv/bin/pip install build
- name: Build wheel
run: ./venv/bin/python -m build --wheel --sdist
- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}