Skip to content

Commit

Permalink
Testing updates
Browse files Browse the repository at this point in the history
  • Loading branch information
danielthompson2 committed Jun 11, 2021
1 parent 2143594 commit 1602771
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 2 deletions.
34 changes: 32 additions & 2 deletions .github/workflows/pythonpackage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
python -m pip install flake8 pytest isort black
- name: Black check
- run: |
black -l 120 --check --diff aad_token_verify tests
- name: isort check
- run: |
isort --check --diff --project=aad_token_verify aad_token_verify tests
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand All @@ -35,4 +41,28 @@ jobs:
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
pytest
- name: Test with pytest
run: |
pytest
publish:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install --upgrade build
- name: Build a binary wheel and a source tarball
run: python -m build --sdist --wheel --outdir dist/ .
- name: Publish distribution to PyPI
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
11 changes: 11 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[metadata]
license_files =
LICENSE

[flake8]
ignore = E226,E302,E41,B008
max-line-length = 120
exclude = tests/*

[isort]
line_length=120

0 comments on commit 1602771

Please sign in to comment.