Skip to content

Commit

Permalink
chore(ci): pipeline using same version of python for all tests (#668)
Browse files Browse the repository at this point in the history
  • Loading branch information
silentworks authored Jan 30, 2025
1 parent bba8033 commit fe7e929
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 23 deletions.
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

0 comments on commit fe7e929

Please sign in to comment.