Skip to content

build(deps-dev): update mypy requirement #19

build(deps-dev): update mypy requirement

build(deps-dev): update mypy requirement #19

Workflow file for this run

# vim: et
on:
push:
jobs:
tests:
name: Run PyTest and Bandit
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@master
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Prepare pip
run: |
python -m pip install --upgrade pip
- name: Install prerequistes for testing
run: |
python -m pip install .[test]
- name: Run tests
run: |
pytest
- name: Run Bandit
run: |
bandit -r src
linting:
name: Run MyPy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Prepare pip
run: |
python -m pip install --upgrade pip
- name: Install prerequistes for testing
run: |
python -m pip install .[test]
- name: Run MyPy
run: |
mypy --package stanford.mais
publish-test:
name: Publish pushes to PyPi's test instance
if: github.event_name == 'push'
needs: tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Prepare pip and install build
run: |
python -m pip install --upgrade pip
python -m pip install build
- name: Make the version number unique
run: |
python update-version-for-test-push.py
- name: Build source and wheel distributions
run: |
python -m build .
- name: Publish pushes to PyPI test
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_UPLOAD_TEST }}
repository_url: https://test.pypi.org/legacy/
publish-prod:
name: Publish tags to PyPi production
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
needs: [tests, linting]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Prepare pip and install build
run: |
python -m pip install --upgrade pip
python -m pip install build
- name: Build source and wheel distributions
run: |
python -m build .
- name: Publish tags to PyPI production
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_UPLOAD_PROD }}