Skip to content

Bump respx from 0.20.2 to 0.21.1 #1257

Bump respx from 0.20.2 to 0.21.1

Bump respx from 0.20.2 to 0.21.1 #1257

Workflow file for this run

name: Linting
on:
push:
branches:
- main
- master
- dev
pull_request:
schedule:
- cron: "0 0 * * *"
env:
DEFAULT_PYTHON: 3.11
jobs:
pre-commit:
runs-on: ubuntu-latest
name: Pre-commit
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Upgrade pip
run: |
pip install --constraint=.github/workflows/constraints.txt pip
pip --version
- name: Install Python modules
run: |
pip install --constraint=.github/workflows/constraints.txt pre-commit black flake8 reorder-python-imports poetry pytest pytest-asyncio pytest-cov aiohttp async_timeout yarl xmltodict numpy cachetools backoff aresponses
- name: Run pre-commit on all files
run: |
pre-commit run --all-files --show-diff-on-failure --color=always
pytest:
name: Python ${{ matrix.python }}
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.9", "3.10", "3.11"]
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v4
- name: 🏗 Set up Python ${{ matrix.python }}
id: python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: 🏗 Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: ⤵️ Restore cached Python PIP packages
uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: pip-${{ steps.python.outputs.python-version }}-${{ hashFiles('requirements.txt') }}
restore-keys: |
pip-${{ steps.python.outputs.python-version }}-
- name: 🏗 Install workflow dependencies
run: |
pip install -r requirements.txt
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
- name: ⤵️ Restore cached Python virtual environment
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ steps.python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
restore-keys: |
venv-${{ runner.os }}-${{ steps.python.outputs.python-version }}-
- name: 🏗 Install dependencies
run: poetry install --no-interaction
- name: 🚀 Run pytest
run: poetry run pytest --cov cybro tests
- name: ⬆️ Upload coverage artifact
uses: actions/upload-artifact@v3
with:
name: coverage-${{ matrix.python }}
path: .coverage
coverage:
runs-on: ubuntu-latest
needs: pytest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v4
- name: ⬇️ Download coverage data
uses: actions/download-artifact@v3
- name: 🏗 Set up Python 3.11
id: python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: 🏗 Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: ⤵️ Restore cached Python PIP packages
uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: pip-${{ steps.python.outputs.python-version }}-${{ hashFiles('requirements.txt') }}
restore-keys: |
pip-${{ steps.python.outputs.python-version }}-
- name: 🏗 Install workflow dependencies
run: |
pip install -r requirements.txt
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
- name: ⤵️ Restore cached Python virtual environment
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: >-
venv-${{ steps.python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
venv-${{ steps.python.outputs.python-version }}-
- name: 🏗 Install dependencies
run: poetry install --no-interaction
- name: 🚀 Process coverage results
run: |
poetry run coverage combine coverage*/.coverage*
poetry run coverage xml -i
- name: 🚀 Upload coverage report
uses: codecov/codecov-action@v4