always with the 0s in yaml #31
Workflow file for this run
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: Python package | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:14.9 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: dadv | |
ports: | |
# will assign a random free host port | |
- 5432/tcp | |
# needed because the postgres container does not provide a healthcheck | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11", "3.12", "3.13"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install uv and Python ${{ matrix.python-version }} | |
uses: astral-sh/setup-uv@v5 | |
with: | |
version: "0.6.12" | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: uv sync --dev | |
- name: Lint with flake8 | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
uv run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
uv run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
- name: Test with pytest | |
env: | |
POSTGRES_HOST: localhost | |
POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }} | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
run: | | |
uv run tox |