Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

Bump aiohttp from 3.8.1 to 3.8.5 #825

Bump aiohttp from 3.8.1 to 3.8.5

Bump aiohttp from 3.8.1 to 3.8.5 #825

Workflow file for this run

name: CI
on:
- push
- pull_request
env:
PYTHON_VERSION: "3.10"
jobs:
codestyle:
name: Codestyle (black+isort)
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v3
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Cache Virtual Environment
uses: actions/cache@v3
with:
path: |
~/.cache/pip
~/.cache/pypoetry
key: ${{ runner.os }}-venv-${{ hashFiles('poetry.lock') }}
- name: Setup poetry
run: |
pip install poetry poethepoet
poetry install -n --no-root
- name: Check code formatting with black and isort
run: poe black --diff --check && poe isort --diff --check
mypy:
name: mypy
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v3
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Cache Virtual Environment
uses: actions/cache@v3
with:
path: |
~/.cache/pip
~/.cache/pypoetry
key: ${{ runner.os }}-venv-${{ hashFiles('poetry.lock') }}
- name: Setup poetry
run: |
pip install poetry poethepoet
poetry install -n --no-root
- name: Check typing with mypy
run: poe mypy
linter:
name: Linter (flake8)
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v3
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Cache Virtual Environment
uses: actions/cache@v3
with:
path: |
~/.cache/pip
~/.cache/pypoetry
key: ${{ runner.os }}-venv-${{ hashFiles('poetry.lock') }}
- name: Setup poetry
run: |
pip install poetry poethepoet
poetry install -n --no-root
- name: Check code style with wemake-python-styleguide
run: poe flake8
# - name: Lint with wemake-python-styleguide
# uses: wemake-services/wemake-python-styleguide@0.16.0
# with:
# reporter: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && 'github-pr-review' || 'terminal' }}
# env:
# GITHUB_TOKEN: ${{ secrets.github_token }}
build:
name: Build Python Package
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
submodules: recursive
fetch-depth: 0
- name: Check Version
run: |
if [[ $GITHUB_REF = refs/tags/v* ]]; then
tag=${GITHUB_REF#refs/tags/v}
version=$(grep '^version =' pyproject.toml | cut -d'"' -f2)
if [[ "$tag" != "$version" ]]; then
echo "::error::Tag $tag does not match version $version"
exit 1
fi
fi
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v3
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Cache Virtual Environment
uses: actions/cache@v3
with:
path: |
~/.cache/pip
~/.cache/pypoetry
key: ${{ runner.os }}-venv-${{ hashFiles('poetry.lock') }}
- name: Setup poetry
run: |
pip install poetry
poetry install -n --no-root
- name: Build python package
run: poetry build
- name: Upload dist
uses: actions/upload-artifact@v3
with:
name: build
path: dist
pypi:
name: Deploy to PyPI
runs-on: ubuntu-latest
needs: [ codestyle, mypy, linter, build ]
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
environment: pypi
steps:
- name: Download dist
uses: actions/download-artifact@v3
with:
name: build
path: dist
- name: Install Twine
run: pip install twine
- name: Upload package to PyPi
run: python -m twine upload -u __token__ -p ${{ secrets.PYPI_TOKEN }} dist/*