-
-
Notifications
You must be signed in to change notification settings - Fork 13
53 lines (49 loc) · 1.6 KB
/
pythonapp.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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: objutils
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
strategy:
matrix:
platform: [ubuntu-latest, windows-latest]
python-version: [3.5, 3.6, 3.7, 3.8, pypy3]
runs-on: ${{matrix.platform}}
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{matrix.python-version}}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel twine
pip install -r requirements.txt
pip install -r test_requirements.txt
#- uses: pre-commit/action@v2.0.3
- name: Test with pytest
run: |
pip install pytest
pytest
- name: Bump version
uses: jaumann/github-bumpversion-action@v0.0.7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BUMP: patch
if: matrix.os == 'ubuntu-latest'
- name: Build dists
run: |
python setup.py bdist_wheel
python setup.py sdist --formats=gztar
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USER_NAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
if: env.TWINE_USERNAME != null
run: |
python setup.py sdist bdist_wheel
twine upload dist/*