Bump requests from 2.28.2 to 2.31.0 #13
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: CI | |
on: [push, pull_request] | |
env: | |
PYTHON_VERSION: '3.10' | |
POETRY_VERSION: '1.3.2' | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Load cached venv | |
id: cache | |
uses: actions/cache@v3 | |
with: | |
path: ".venv" | |
key: venv-${{ runner.os }}-${{ hashFiles('poetry.lock') }} | |
restore-keys: | | |
venv-${{ runner.os }}-${{ hashFiles('poetry.lock') }} | |
venv-${{ runner.os }} | |
- name: Setup poetry | |
uses: abatilo/actions-poetry@v2.2.0 | |
with: | |
poetry-version: ${{ env.POETRY_VERSION }} | |
- name: Install dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: poetry install | |
- name: Run Black | |
run: poetry run black . --check --diff --color | |
- name: Run MyPy checks | |
run: poetry run mypy . --show-error-context --pretty | |
- name: Export PiP requirements | |
run: poetry export -f requirements.txt > requirements.txt | |
- name: Prepare dist | |
run: poetry build | |
- name: Check metadata | |
run: pipx run twine check dist/* | |
- name: Dry publish | |
run: poetry publish --username "${PYPI_USERNAME}" --password "${PYPI_PASSWORD}" --dry-run | |
env: | |
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
- name: Publish | |
if: contains('refs/heads/master', github.ref) && github.event_name == 'push' | |
run: poetry publish --username "${PYPI_USERNAME}" --password "${PYPI_PASSWORD}" | |
env: | |
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} |