Skip to content

Create github actions #2

Create github actions

Create github actions #2

name: Python package
on:
push:
branches: [ master ]
tags:
- '*'
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [2.7, 3.6, 3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-test.txt
- name: Test with pytest
run: |
pytest
- name: Build and publish to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
uses: pypa/[email protected]
with:
user: domain-connect
password: ${{ secrets.PYPI_PASSWORD }}
distributions: "sdist bdist_wheel"
skip_existing: true