Compare commits

...
Author SHA1 Message Date
hermes 7fc6ad7438 ci: retrigger to test merge_main workflow with PUSH_TOKEN 2026-09-04 11:08:33 +00:00
hermes 43b5afaf94 ci: retrigger after comment cleanup
Python package / build (3.12.3) (pull_request) Successful in 4m17s
Python package / build (3.13) (pull_request) Successful in 2m15s
Python package / build (3.14) (pull_request) Successful in 2m28s
2026-09-04 07:31:40 +00:00
admin e3bc8a3212 Merge branch 'main' into feat/optimize-ci-build-time
Python package / build (3.12.3) (pull_request) Successful in 10m47s
Python package / build (3.13) (pull_request) Successful in 10m50s
Python package / build (3.14) (pull_request) Successful in 10m53s
2026-09-04 08:30:58 +02:00
hermes 0cb62d233a ci: trim explanatory comments from python-package.yml
Python package / build (3.12.3) (pull_request) Successful in 2m17s
Python package / build (3.13) (pull_request) Failing after 11m17s
Python package / build (3.14) (pull_request) Canceled after 11m58s
Drop the CI-history and per-option narration comments; keep only what is
needed for the workflow to be readable (job names, step names). Mirrors
the repo's compose/env/entrypoint-with-no-explanatory-comments style.
2026-09-04 06:15:05 +00:00
hermes ac682c1a92 ci: retrigger after run #58 success
Python package / build (3.12.3) (pull_request) Successful in 2m10s
Python package / build (3.13) (pull_request) Successful in 2m12s
Python package / build (3.14) (pull_request) Successful in 2m22s
2026-09-03 21:43:42 +00:00
hermes 0bbb3c4c26 ci: retrigger after runner cache register fix
Python package / build (3.12.3) (pull_request) Successful in 3m45s
Python package / build (3.13) (pull_request) Successful in 2m11s
Python package / build (3.14) (pull_request) Successful in 2m18s
2026-09-03 21:17:35 +00:00
hermes c6af53ec7e ci: empty commit to retrigger cache verification run
Python package / build (3.12.3) (pull_request) Canceled after 0s
Python package / build (3.13) (pull_request) Canceled after 0s
Python package / build (3.14) (pull_request) Canceled after 0s
2026-09-03 20:42:40 +00:00
hermes db3807e49a ci: speed up python-package.yml from ~13min to ~3-4min
Python package / build (3.12.3) (pull_request) Successful in 12m41s
Python package / build (3.13) (pull_request) Successful in 11m13s
Python package / build (3.14) (pull_request) Successful in 11m18s
The build job was running for ~13 minutes per PR even with tests
disabled (per PR #13). The actual cause: the matrix had
3 python-versions x 5 checkers = 15 separate CI jobs, each
re-installing the same requirements.txt + requirements-dev.txt
from scratch with no pip cache.

This commit:
  1. Enables pip caching via actions/setup-python@v5 cache: 'pip'
     keyed on the contents of requirements.txt and requirements-dev.txt.
     When those files don't change, pip install is near-instant.
     When they do change, only the diff downloads.

  2. Drops two debug-only matrix entries that were never real checks:
       python -c 'import sys; print(...)'  (debug)
       pip list                          (debug)
     They took up two of the five matrix cells but produced no
     actionable signal.

  3. Restructures the matrix so each Python version runs ONE job
     that does install + flake8 (2 invocations) + mypy sequentially,
     instead of one job per (version, checker) pair. Net: 3 jobs
     total instead of 15.

  4. Adds a concurrency: cancel-in-progress block so a new push
     to the same PR auto-cancels the previous in-flight run,
     saving runner minutes when iterating on a fix.

Verified:
  - YAML parses via PyYAML
  - jobs dict contains ['build'] only
  - matrix python versions: ['3.12.3', '3.13', '3.14']
  - total CI jobs: 3 (was 15)
  - actions/setup-python@v5 with cache: 'pip' + cache-dependency-path
    on requirements.txt and requirements-dev.txt

Expected wall-clock (rough estimate, depends on cache hits):
  Before: ~13 min (15 jobs, no pip cache, install on every job)
  After (cold): ~5-7 min (3 jobs, pip cache miss on first run)
  After (warm): ~3-4 min (3 jobs, pip cache hits)

If caching doesn't activate (e.g. self-hosted runner ignores cache:),
the win comes mostly from 15 -> 3 jobs (~5x faster).

Note: PR #14 (re-enable tests) is still open. If/when it merges, this
PR will need a follow-up to re-add the tests job with the same
cache setup applied.
2026-08-25 22:10:30 +00:00
2 changed files with 25 additions and 57 deletions
+20 -57
View File
@@ -1,6 +1,3 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python package
on:
@@ -10,74 +7,40 @@ on:
pull_request:
branches: [ "main" ]
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [
# "3.11.3",
"3.12.3",
"3.13",
"3.14",
# "3.15",
]
checker: [
"python -c \"import sys; print(f'Python {sys.version}'); print(f'Build: {sys.version_info}'); print(f'Implementation: {sys.implementation}')\"",
"pip list",
"flake8 . --count --select=E9,F63,F7,F82 --ignore=F824 --show-source --statistics",
"flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics",
# "ty check backend",
"mypy --no-incremental --config-file mypy.ini backend tests",
]
python-version: ["3.12.3", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}, ${{ matrix.checker }}
uses: actions/setup-python@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: |
requirements.txt
requirements-dev.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Run checker
run: ${{ matrix.checker }}
# tests:
# runs-on: ubuntu-latest
# needs: build
# strategy:
# fail-fast: false
# matrix:
# python-version: [
# # "3.11.3",
# "3.12.3",
# "3.13",
# "3.14",
# # "3.15",
# ]
# checker: [
# "pytest",
# ]
# steps:
# - uses: actions/checkout@v4
# - name: Set up Python ${{ matrix.python-version }}, ${{ matrix.checker }}
# uses: actions/setup-python@v3
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install dependencies
# run: |
# # sudo apt-get update
# # sudo apt-get upgrade -y
# # sudo apt-get install -y --no-install-recommends git docker.io
# python -m pip install --upgrade pip
# pip install -r requirements-dev.txt
# playwright install --with-deps chromium
# - name: Run checker
# run: "pytest"
#
#
#
- name: Lint (flake8)
run: |
flake8 . --count --select=E9,F63,F7,F82 --ignore=F824 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Type-check (mypy)
run: mypy --no-incremental --config-file mypy.ini backend tests
+5
View File
@@ -11,3 +11,8 @@ types-PyYAML
types-requests
types-docker
testcontainers