10000 Fix sint parsing · betterproto/python-betterproto2@da5e306 · GitHub
[go: up one dir, main page]

Skip to content

More validation

More validation #252

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- '**'
permissions:
contents: read
jobs:
tests:
name: ${{ matrix.os }} / ${{ matrix.python-version }} / Rust codec ${{ matrix.rust-codec }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [Ubuntu, MacOS, Windows]
python-version: ['3.10', '3.11', '3.12', '3.13']
rust-codec: ['disabled'] # TODO add 'enabled' when the Rust codec is ready
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")" >> "$GITHUB_OUTPUT"
- name: Install poetry
shell: bash
run: |
python -m pip install poetry
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
- name: Configure poetry
shell: bash
run: poetry config virtualenvs.in-project true
- name: Set up cache
uses: actions/cache@v4
id: cache
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-rust-codec-${{ matrix.rust-codec }}-${{ hashFiles('**/poetry.lock') }}
- name: Ensure cache is healthy
if: steps.cache.outputs.cache-hit == 'true'
shell: bash
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv
- name: Install dependencies
if: matrix.rust-codec == 'disabled'
shell: bash
run: poetry install -E all
- name: Install dependencies with the Rust codec
if: matrix.rust-codec == 'enabled'
shell: bash
run: poetry install -E all -E rust-codec
- name: Download compiled test files
shell: bash
run: poetry run poe pull-compiled-tests
- name: Execute test suite
shell: bash
run: poetry run poe test
0