-
Notifications
You must be signed in to change notification settings - Fork 21
50 lines (48 loc) · 1.22 KB
/
main.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
name: test
on:
- push
- pull_request
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- uses: pre-commit/action@v3.0.0
build:
runs-on: ubuntu-latest
strategy:
matrix:
tox_env:
- py37
- py38
- py39
- py310
- pypy3
steps:
- uses: actions/checkout@v3
- name: Fedora Tox with ${{ matrix.tox_env }}
uses: fedora-python/tox-github-action@v37.0
with:
tox_env: ${{ matrix.tox_env }}
- uses: actions/setup-python@v4
with:
cache: pip
cache-dependency-path: |
requirements-dev.txt
setup.py
deploy:
name: Build deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: casperdcl/deploy-pypi@v2.3.2
with:
password: ${{ secrets.PYPI_TOKEN }}
build: true
# only upload if a tag is pushed (otherwise just build & check)
upload: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') }}