-
Notifications
You must be signed in to change notification settings - Fork 11
57 lines (55 loc) · 1.54 KB
/
check.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: check
on:
push:
pull_request:
jobs:
test:
name: Test with Python ${{ matrix.py }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
py:
- "3.11"
- "3.10"
- "3.9"
- "3.8"
- "3.7"
steps:
- name: Setup python for test ${{ matrix.py }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.py }}
- uses: actions/checkout@v2
- name: Install tox-gh
run: python -m pip install tox-gh
- name: Setup test suite
run: tox
- if: ${{ matrix.py == '3.11' }}
name: Generate coverage data
run: .tox/py310/bin/coverage lcov -o coverage/lcov.info
- if: ${{ matrix.py == '3.11' }}
name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
publish:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
needs: [test]
runs-on: ubuntu-latest
steps:
- name: Setup python to build package
uses: actions/setup-python@v2
with:
python-version: "3.11"
- name: Install build
run: python -m pip install build
- uses: actions/checkout@v2
- name: Build sdist and wheel
run: python -m build -s -w . -o dist
- name: Publish to PyPi
uses: pypa/gh-action-pypi-publish@master
with:
skip_existing: true
user: ${{ secrets.pypi_user }}
password: ${{ secrets.pypi_password }}