Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): pipeline using same version of python for all tests #668

Merged
merged 3 commits into from
Jan 30, 2025
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
39 changes: 18 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,32 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Set up Poetry
uses: abatilo/actions-poetry@v4
with:
poetry-version: 1.8.4
run: pipx install poetry==1.8.5 --python python${{ matrix.python-version }}
- name: Run Tests
run: make run_tests
- name: Run Tests with pydantic v1
run: |
pip install pydantic==1.10.12
make tests_only
- name: Upload coverage to Coveralls
if: ${{ matrix.python-version }} == "3.12"
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: run-${{ join(matrix.*, '-') }}
parallel: true

finish_tests:
needs: test
name: Upload tests coveralls results
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
carryforward: "run-ubuntu-latest-3.9,run-ubuntu-latest-3.10,run-ubuntu-latest-3.11,run-ubuntu-latest-3.12,run-ubuntu-latest-3.13"

release-please:
needs: test
Expand Down Expand Up @@ -81,9 +93,7 @@ jobs:
fetch-depth: 0

- name: Set up Poetry
uses: abatilo/actions-poetry@v4
with:
poetry-version: 1.8.4
run: pipx install poetry==1.8.5 --python python3.11

- name: Install dependencies
run: poetry install
Expand Down Expand Up @@ -122,20 +132,7 @@ jobs:
run: make rename_project

- name: Set up Poetry
uses: abatilo/actions-poetry@v4
with:
poetry-version: 1.8.4

- name: Setup a local virtual environment (if no poetry.toml file)
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local

- uses: actions/cache@v4
name: Define a cache for the virtual environment based on the dependencies lock file
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
run: pipx install poetry==1.8.5 --python python3.11

- name: Install the project dependencies
run: poetry install
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
exclude: '^.*\.(md|MD)$'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: check-added-large-files
Expand All @@ -10,7 +10,7 @@ repos:
args: ["--fix=lf"]

- repo: https://github.com/pycqa/isort
rev: 5.13.2
rev: 6.0.0
hooks:
- id: isort
args:
Expand Down