Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CI

on:
push:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think on: push + on: pull_request without branch filters means every PR triggers two different workflow runs. What about filtering with push: branches: [main]?

pull_request:

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- python-version: "3.6"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python 3.6/3.7 are ancient and EOL. You mentioned in the issue to start using 3.10 (which was the right call), why not following through with it? :)

tox-env: py36
container-image: python:3.6-buster
Copy link
Collaborator

@robertodauria robertodauria Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this is using container images because setup-python refuses to install 3.6/3.7. You're fighting the tooling to preserve something that should be dropped.

Also, debian buster is EOL since 2024.

- python-version: "3.7"
tox-env: py37
container-image: python:3.7-buster
container:
image: ${{ matrix.container-image }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Cache pip downloads
uses: actions/cache@v4
with:
path: /root/.cache/pip
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect this is less useful than it could be. tox creates virtualenvs for testing, but the .tox/ directory isn't cached, causing every run to reinstall every dependency from scratch.

key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml', 'poetry.lock') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-

- name: Install CI tools (Travis before_script parity)
run: |
python -m pip install --upgrade pip
pip install -U poetry tox-travis codecov tox
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the point of tox-travis in a Github Actions setup?


- name: Run tests via tox
run: tox -e "${{ matrix.tox-env }}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no tox.ini and the tox config still has a Travis-specific passenv. Perhaps we want CI GITHUB_* there?


- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: .coverage
flags: ${{ matrix.tox-env }}
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}