Skip to content

Update dependencies and small changes #34

Update dependencies and small changes

Update dependencies and small changes #34

Workflow file for this run

name: Python Package
on:
- push
- pull_request
jobs:
test:
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools
pip install tox tox-gh-actions
- name: Install to system
run: |
python setup.py install
- name: Run tox for Test
run: |
tox
- name: Run example*.py for test
shell: bash
run: |
cd examples
for file in $(ls example*.py); do
echo "::group::Run $file"
python3 "$file"
echo "::endgroup::"
done
build:
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools
- name: Build
run: |
python setup.py sdist
- uses: actions/upload-artifact@v2
with:
path: ${{ github.workspace }}/dist/*
publish:
needs: [build]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/download-artifact@v2
with:
name: artifact
path: dist
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}