Bump mypy from 1.11.0 to 1.11.1 #1260
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Integration | |
on: [push] | |
jobs: | |
checks: | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies with apt | |
run: | | |
sudo apt-get install nginx-core openssl | |
- name: Install dependencies with pip | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Run black | |
run: | | |
black --check aiotus tests | |
- name: Run flake8 | |
run: | | |
flake8 aiotus tests | |
- name: Run isort | |
run: | | |
isort aiotus tests | |
- name: Run mypy | |
run: | | |
mypy --strict aiotus | |
mypy tests | |
- name: Run bandit | |
run: | | |
bandit --recursive aiotus | |
- name: Download tusd | |
run: | | |
make tusd | |
- name: Create test certificates | |
run: | | |
make tests/nginx.key tests/selfsigned.crt | |
- name: Run pytest (1st try) | |
id: pytest1 | |
run: | | |
PYTHONPATH=. pytest --cov=aiotus --cov-report=xml tests | |
continue-on-error: true | |
- name: Run pytest (2nd try) | |
id: pytest2 | |
if: steps.pytest1.outcome == 'failure' | |
run: | | |
PYTHONPATH=. pytest --cov=aiotus --cov-report=xml tests | |
continue-on-error: true | |
- name: Run pytest (3rd try) | |
if: steps.pytest2.outcome == 'failure' | |
run: | | |
PYTHONPATH=. pytest --cov=aiotus --cov-report=xml tests | |
- name: Upload coverage information | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Generate documentation | |
if: matrix.python-version != '3.8' | |
run: | | |
make -C docs html | |
package: | |
needs: checks | |
runs-on: ubuntu-latest | |
environment: | |
name: testpypi | |
url: https://test.pypi.org/project/aiotus | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/[email protected] | |
- name: Set up Python 3.8 | |
uses: actions/[email protected] | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install build | |
- name: Package | |
run: | | |
python -m build | |
- name: Upload artifacts | |
uses: actions/[email protected] | |
with: | |
name: packages | |
path: dist/ | |
- name: Publish to TestPyPi | |
if: (github.ref == 'refs/heads/master') || (github.event_name == 'release' && github.event.action == 'created') | |
uses: pypa/[email protected] | |
with: | |
repository-url: https://test.pypi.org/legacy/ |