Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: 3.11
- name: Install tools
Expand Down
119 changes: 18 additions & 101 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,125 +2,42 @@ name: test
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: "0 8 * * *"
- cron: "0 8 * * 1" # every Monday at 8am UTC

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e '.[dev]'
- name: Format with Black
run: black .
- name: Lint with Ruff
run: ruff check .


py_39_proto_203:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-13, windows-latest ]
runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: 3.9
architecture: x64
cache: pip
- name: Install Protoc
uses: arduino/setup-protoc@v1.1.2
with:
version: 3.20.3
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: install dependencies
run: |
pip install --upgrade pip
pip install -e '.[ci]'
protoc --version
pip freeze
- name: Setup test suite
run: tox -vv --notest
- name: Run test suite
run: tox --skip-pkg-install
- uses: astral-sh/setup-uv@v7
- run: uv run --extra dev ruff check .

py_31x_proto_252:
test:
strategy:
fail-fast: false
matrix:
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
os: [ ubuntu-latest, macos-13, windows-latest ]
python: [ '3.10', '3.11']
# https://docs.github.com/en/actions/using-jobs/using-a-matrix
os: [ubuntu-latest, macos-latest, windows-latest]
protoc: ["25.x", "34.x"]
runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
# https://github.com/actions/checkout
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
# https://github.com/actions/setup-python
with:
python-version: ${{ matrix.python }}
architecture: x64
cache: pip
- name: Install Protoc
uses: arduino/setup-protoc@v3
# https://github.com/astral-sh/setup-uv
# https://github.com/arduino/setup-protoc
- uses: astral-sh/setup-uv@v7
- uses: arduino/setup-protoc@v3
with:
version: 25.2
version: ${{ matrix.protoc }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: install dependencies
run: |
pip install --upgrade pip
pip install -e '.[ci]'
protoc --version
pip freeze
- name: Setup test suite
run: tox -vv --notest
- name: Run test suite
run: tox --skip-pkg-install

py_3x_proto_25x:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- run: uv run --extra ci tox -e py310,py311,py312,py313,py314
- uses: codecov/codecov-action@v5
if: matrix.os == 'ubuntu-latest' && matrix.protoc == '25.x'
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: 3.x
architecture: x64
cache: pip
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
version: 25.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: install dependencies
run: |
pip install --upgrade pip
pip install -e '.[ci]'
pip --version
pip freeze
- name: Setup test suite
run: tox -vv --notest
- name: Run test suite
run: tox --skip-pkg-install
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
24 changes: 5 additions & 19 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,16 @@
# To install the git pre-commit hook run:
# pre-commit install
# To update the pre-commit hooks run:
# pre-commit install-hooks
# pre-commit autoupdate
exclude: '^(\.tox|\.bumpversion\.cfg)(/|$)'
repos:
- repo: https://github.com/psf/black
rev: 24.1.1
hooks:
- id: black
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.6.2"
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.11.2"
hooks:
- id: ruff
- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
hooks:
- id: pyupgrade
args: [ '--py38-plus' ]
- repo: https://github.com/mgedmin/check-python-versions
rev: 0.22.0
hooks:
- id: check-python-versions
args: [ '--only', 'pyproject.toml,tox.ini' ]
verbose: true
- id: ruff-format
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
Expand Down
Loading
Loading