Bump typing-extensions from 4.13.0 to 4.14.1 #113
This file contains hidden or 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: test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
env: | |
GITHUB_ACTIONS_REDIS_TIMEOUT: 60 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
id-token: write | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
- name: Install Poetry | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry | |
- name: Install dependencies | |
run: poetry install --no-interaction --with=dev | |
shell: bash | |
- name: Check code style and type checks | |
run: | | |
poetry run ssort ./call_gate | |
poetry run ruff format ./call_gate | |
poetry run ruff check ./call_gate --diff | |
poetry run mypy ./call_gate --install-types --non-interactive --config-file pyproject.toml | |
shell: bash | |
matrix_tests: | |
needs: lint | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] | |
services: | |
redis: | |
image: redis:latest | |
ports: | |
- 6379:6379 | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 5s | |
--health-timeout 3s | |
--health-retries 5 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry | |
- name: Install dependencies | |
run: poetry install --no-interaction --with=dev | |
shell: bash | |
- name: Run tests | |
env: | |
REDIS_HOST: localhost | |
REDIS_PORT: 6379 | |
GITHUB_ACTIONS_REDIS_TIMEOUT: ${{ env.GITHUB_ACTIONS_REDIS_TIMEOUT }} | |
run: poetry run pytest | |
shell: bash | |
coverage: | |
needs: matrix_tests | |
runs-on: ubuntu-latest | |
services: | |
redis: | |
image: redis:latest | |
ports: | |
- 6379:6379 | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 5s | |
--health-timeout 3s | |
--health-retries 5 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
- name: Install Poetry | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry | |
- name: Install dependencies | |
run: poetry install --no-interaction --with=dev | |
shell: bash | |
- name: Run tests with coverage | |
env: | |
REDIS_HOST: localhost | |
REDIS_PORT: 6379 | |
GITHUB_ACTIONS_REDIS_TIMEOUT: ${{ env.GITHUB_ACTIONS_REDIS_TIMEOUT }} | |
run: poetry run pytest --cov-fail-under=97 --cov=./call_gate --cov-branch --cov-report=xml --ignore=tests/test_asgi_wsgi.py ./tests | |
shell: bash | |
- name: Upload results to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |