-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (38 loc) · 1.11 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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 }}