Skip to content
This repository was archived by the owner on Jun 9, 2025. It is now read-only.
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
8 changes: 2 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
fail-fast: false
matrix:
os: [Ubuntu, MacOS, Windows]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -54,12 +54,8 @@ jobs:

- name: Install dependencies
shell: bash
run: poetry install -E compiler
run: poetry install

- name: Generate code from proto files
shell: bash
run: poetry run python -m tests.generate -v

- name: Execute test suite
shell: bash
run: poetry run python -m pytest tests/
67 changes: 67 additions & 0 deletions .github/workflows/compilation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Test files compilation

on:
push:
branches:
- main

permissions:
contents: write

jobs:
compilation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12

- 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@v3
id: cache
with:
path: .venv
key: venv-compilation-${{ 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
shell: bash
run: poetry install

- name: Compile proto files
shell: bash
run: poetry run poe generate

- name: Publish the compiled files
shell: bash
run: |
git checkout --orphan compiled-test-files
git reset --hard
cp -r tests/output_betterproto tests_betterproto
cp -r tests/output_betterproto_pydantic tests_betterproto_pydantic
cp -r tests/output_reference tests_reference
git add tests_betterproto tests_betterproto_pydantic tests_reference
git commit -m "Add compilation output"
git push --force origin compiled-test-files
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: "3.10"
- name: Install poetry
run: python -m pip install poetry
- name: Build package
Expand Down
Loading
Loading