Skip to content

Make it possible to inject HTTP requests.Session #1127

Make it possible to inject HTTP requests.Session

Make it possible to inject HTTP requests.Session #1127

Workflow file for this run

name: package
on: [push]
permissions:
id-token: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python:
- "3.12"
db_url:
- "postgresql://nomenklatura:nomenklatura@localhost:5432/nomenklatura"
- "sqlite:///:memory:"
services:
# Label used to access the service container
db:
# Docker Hub image
image: postgres
# Provide the password for postgres
env:
POSTGRES_USER: nomenklatura
POSTGRES_PASSWORD: nomenklatura
POSTGRES_DB: nomenklatura
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get install -y -qq libicu-dev
python -m pip install --upgrade pip wheel pyicu
pip install -e '.[dev]'
- name: Check type annotations (strict)
run: |
make typecheck
- name: Run tests
env:
NOMENKLATURA_DB_URL: ${{ matrix.db_url }}
run: |
make test
- name: Build a distribution
run: |
python3 -m build --wheel
- name: Publish a Python distribution to PyPI
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && matrix.python == '3.12'
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
verbose: true