Skip to content

Merge pull request #50 from MichielTukker/dependabot/pip/idna-3.7 #107

Merge pull request #50 from MichielTukker/dependabot/pip/idna-3.7

Merge pull request #50 from MichielTukker/dependabot/pip/idna-3.7 #107

name: Build and Test
on: [push]
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip, setuptools and wheel
run: python -m pip install --upgrade pip setuptools wheel
- name: Install development dependencies
run: pip install flake8 pytest pytest-cov
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Install wandatoolbox as editable
run: |
pip install -e .
- name: Install dependencies
run: pip install -r requirements.txt
- name: Test with pytest
run: |
pytest
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.11'
- name: Install dependencies for deploy
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build wheel packages
run: |
python setup.py sdist bdist_wheel
- name: Publish distribution package to Test PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution package to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.pypi_password }}