Skip to content

chore: move dev requirements to a dedicated file #80

chore: move dev requirements to a dedicated file

chore: move dev requirements to a dedicated file #80

Workflow file for this run

name: build
on: [push]
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
fail-fast: true
name: Lint on Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Lint
run: |
pip install -r dev-requirements.in
flake8 requests_ntlm2
bandit -r requests_ntlm2
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
fail-fast: true
name: Test on Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Test
run: |
pip install -r dev-requirements.in .
python -m tests.test_server &> /dev/null &
pytest -xv --ignore=tests/functional/test_functional.py --ignore=tests/test_server.py --cov requests_ntlm2 --cov-report term-missing tests
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
publish:
needs: [lint, test]
name: Publish to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Build package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: |
pip install setuptools wheel
python setup.py sdist bdist_wheel
- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}