Skip to content

Commit

Permalink
fix: support version changes in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
EuleMitKeule committed Oct 19, 2024
1 parent 01aecfa commit 0eb0ec5
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 18 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.13"

- name: Load cached Poetry installation
id: cached-poetry
uses: actions/cache@v4
with:
path: ~/.local
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-3.13

- name: Install Poetry
if: steps.cached-poetry.outputs.cache-hit != 'true'
Expand All @@ -88,7 +88,7 @@ jobs:
uses: actions/cache@v4
with:
path: .venv
key: poetry-venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
key: poetry-venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-3.13

- name: Install dependencies
if: steps.cached-poetry-venv.outputs.cache-hit != 'true'
Expand Down
50 changes: 35 additions & 15 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,26 @@ env:
jobs:
cache:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.12"
- "3.13"
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: ${{ matrix.python-version }}

- name: Load cached Poetry installation
id: cached-poetry
uses: actions/cache@v4
with:
path: ~/.local
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ matrix.python-version }}

- name: Install Poetry
if: steps.cached-poetry.outputs.cache-hit != 'true'
Expand All @@ -47,7 +52,7 @@ jobs:
uses: actions/cache@v4
with:
path: .venv
key: poetry-venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
key: poetry-venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ matrix.python-version }}

- name: Install dependencies
if: steps.cached-poetry-venv.outputs.cache-hit != 'true'
Expand All @@ -59,26 +64,31 @@ jobs:
ruff:
needs: cache
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.12"
- "3.13"
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: ${{ matrix.python-version }}

- name: Load cached Poetry installation
uses: actions/cache@v4
with:
path: ~/.local
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ matrix.python-version }}

- name: Load cached Poetry venv
uses: actions/cache@v4
with:
path: ~/.venv
key: poetry-venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
key: poetry-venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ matrix.python-version }}

- name: Install package
run: |
Expand All @@ -91,26 +101,31 @@ jobs:
mypy:
needs: cache
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.12"
- "3.13"
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: ${{ matrix.python-version }}

- name: Load cached Poetry installation
uses: actions/cache@v4
with:
path: ~/.local
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ matrix.python-version }}

- name: Load cached Poetry venv
uses: actions/cache@v4
with:
path: ~/.venv
key: poetry-venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
key: poetry-venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ matrix.python-version }}

- name: Install package
run: |
Expand Down Expand Up @@ -141,13 +156,13 @@ jobs:
uses: actions/cache@v4
with:
path: ~/.local
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ matrix.python-version }}

- name: Load cached Poetry venv
uses: actions/cache@v4
with:
path: ~/.venv
key: poetry-venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
key: poetry-venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ matrix.python-version }}

- name: Install package
run: |
Expand All @@ -160,6 +175,11 @@ jobs:
sonar:
needs: cache
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.12"
- "3.13"
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -169,19 +189,19 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: ${{ matrix.python-version }}

- name: Load cached Poetry installation
uses: actions/cache@v4
with:
path: ~/.local
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ matrix.python-version }}

- name: Load cached Poetry venv
uses: actions/cache@v4
with:
path: ~/.venv
key: poetry-venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
key: poetry-venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ matrix.python-version }}

- name: Install package
run: |
Expand All @@ -207,4 +227,4 @@ jobs:
-Dsonar.python.coverage.reportPaths=coverage.xml
-Dsonar.sources=eq3btsmart
-Dsonar.tests=tests
-Dsonar.python.version=3.11
-Dsonar.python.version=${{ matrix.python-version }}
24 changes: 24 additions & 0 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0eb0ec5

Please sign in to comment.