Skip to content

change setuptools build to flit #41

change setuptools build to flit

change setuptools build to flit #41

Workflow file for this run

name: Python package
on: [push]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install -U pip wheel
pip install -r requirements-dev.txt
- name: Security analysis with bandit
run: |
bandit --ini .bandit --recursive .
- name: Lint with flake8
run: |
flake8 --select=E9,F63,F7,F82 .
test:
needs: lint
strategy:
matrix:
os: [ubuntu-20.04, macos-latest, windows-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install -U pip wheel
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
- name: Run tests
run: |
python -m unittest discover -s tests
deploy:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Build dists
run: |
python -m pip install -U pip wheel
python setup.py sdist bdist_wheel
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}