Consolidate to pyproject

Consolidates configs to pyproject.toml and updates workflows accordingly as well as sets sane minimums for dev requirements.

adds version check to main script.
This commit is contained in:
OMEGARAZER
2022-12-16 23:45:36 -05:00
parent d0da9be376
commit 8c01a9e7a0
15 changed files with 114 additions and 68 deletions

View File

@@ -10,4 +10,4 @@ jobs:
- uses: actions/checkout@v3
- uses: paolorechia/pox@v1.0.1
with:
tox_env: "format_check"
tox_env: "format_check"

View File

@@ -11,25 +11,25 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install build setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
python -m build
twine upload dist/*
- name: Upload coverage report
uses: actions/upload-artifact@v2
- name: Upload dist folder
uses: actions/upload-artifact@v3
with:
name: dist
path: dist/

View File

@@ -19,16 +19,16 @@ jobs:
python-version: 3.9
ext: .ps1
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip flake8 pytest pytest-cov
pip install -r requirements.txt
pip install .
- name: Make configuration for tests
env:
@@ -43,9 +43,9 @@ jobs:
- name: Test with pytest
run: |
pytest -m 'not slow' --verbose --cov=./bdfr/ --cov-report term:skip-covered --cov-report html
- name: Upload coverage report
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: coverage_report
path: htmlcov/