Skip to content

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

[pre-commit.ci] pre-commit autoupdate

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

Workflow file for this run

name: CI
on:
push:
pull_request:
jobs:
tests:
strategy:
matrix:
python_version: ["3.7", "3.9", "3.10", "3.11"]
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
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@v3
release:
runs-on: ubuntu-latest
needs: [tests]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- name: Install tooling
run: pip install build
- name: Build wheel
run: 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 }}