Skip to content

Commit

Permalink
fix(ci): Use a version matrix and let rye pin the python version
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelSasser committed Oct 10, 2024
1 parent a415fe7 commit 50eb143
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 15 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,32 @@ on:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]

steps:
- name: Checkout code
uses: actions/[email protected]

- name: Set up Python 3.12
uses: actions/[email protected]
with:
python-version: "3.12"
# - name: Set up Python 3.12
# uses: actions/[email protected]
# with:
# python-version: "${{ matrix.python-version }}"

- name: Setup Rye
id: setup-rye
uses: eifinger/setup-rye@v4
with:
version: "0.41.0"
enable-cache: true
cache-prefix: python-${{ matrix.python-version }}
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install Project Dependencies
run: rye sync --all-features --no-lock
run: |
rye pin --no-update-requires-python '${{ matrix.python-version }}'
rye sync --all-features --no-lock
- name: Run pre-commit
run: |
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
- name: Checkout code
uses: actions/[email protected]

- name: Set up Python 3.12
uses: actions/[email protected]
with:
python-version: "3.12"
# - name: Set up Python 3.12
# uses: actions/[email protected]
# with:
# python-version: "3.12"

- name: Setup Rye
id: setup-rye
Expand All @@ -42,7 +42,9 @@ jobs:
version: "0.41.0"

- name: Install Project Dependencies
run: rye sync --all-features --no-lock
run: |
rye pin --no-update-requires-python '3.12'
rye sync --all-features --no-lock
- name: Make docs
working-directory: ${{env.working-directory}}
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
- name: Checkout code
uses: actions/[email protected]

- name: Set up Python 3.12
uses: actions/[email protected]
with:
python-version: "3.12"
# - name: Set up Python 3.12
# uses: actions/[email protected]
# with:
# python-version: "3.12"

- name: Setup Rye
id: setup-rye
Expand All @@ -42,7 +42,9 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install Project Dependencies
run: rye sync --all-features --no-lock
run: |
rye pin --no-update-requires-python '3.12'
rye sync --all-features --no-lock
- name: Build project
run: rye build --all --clean
Expand Down

0 comments on commit 50eb143

Please sign in to comment.