Skip to content

Commit

Permalink
fix: python version order and CI scaffold (#9)
Browse files Browse the repository at this point in the history
- python version as env var  in CI, and in scaffolds
- escaped in templates so jinja can rendr

---------

Co-authored-by: Johannes Köster <[email protected]>
  • Loading branch information
jakevc and johanneskoester authored Feb 16, 2024
1 parent 91da3d3 commit f5f7250
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 19 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:

name: release-please

env:
PYTHON_VERSION: 3.11

jobs:
release-please:
runs-on: ubuntu-latest
Expand All @@ -24,19 +27,19 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: ${{ env.PYTHON_VERSION }}

- name: Install poetry
run: pipx install poetry
run: pip install poetry

- name: Determine dependencies
run: poetry lock

- uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: ${{ env.PYTHON_VERSION }}
cache: poetry

- name: Install Dependencies using Poetry
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- main
pull_request:

env:
PYTHON_VERSION: 3.11

jobs:
formatting:
runs-on: ubuntu-latest
Expand All @@ -15,8 +18,8 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: ${{ env.PYTHON_VERSION }}

- name: Install poetry
run: pip install poetry

Expand All @@ -25,7 +28,7 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: ${{ env.PYTHON_VERSION }}
cache: poetry

- name: Install Dependencies using Poetry
Expand All @@ -42,7 +45,7 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: ${{ env.PYTHON_VERSION }}

- name: Install poetry
run: pip install poetry
Expand All @@ -52,7 +55,7 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: ${{ env.PYTHON_VERSION }}
cache: poetry

- name: Install Dependencies using Poetry
Expand All @@ -68,7 +71,7 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: ${{ env.PYTHON_VERSION }}

- name: Install poetry
run: pip install poetry
Expand All @@ -78,7 +81,7 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: ${{ env.PYTHON_VERSION }}
cache: poetry

- name: Install dependencies
Expand Down
15 changes: 9 additions & 6 deletions poetry_snakemake_plugin/templates/ci.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- main
pull_request:

env:
PYTHON_VERSION: 3.11

jobs:
formatting:
runs-on: ubuntu-latest
Expand All @@ -15,7 +18,7 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: {{ "${{ env.PYTHON_VERSION }}" }}

- name: Install poetry
run: pip install poetry
Expand All @@ -25,7 +28,7 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: {{ "${{ env.PYTHON_VERSION }}" }}
cache: poetry

- name: Install Dependencies using Poetry
Expand All @@ -42,7 +45,7 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: {{ "${{ env.PYTHON_VERSION }}" }}

- name: Install poetry
run: pip install poetry
Expand All @@ -52,7 +55,7 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: {{ "${{ env.PYTHON_VERSION }}" }}
cache: poetry

- name: Install Dependencies using Poetry
Expand All @@ -68,7 +71,7 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: {{ "${{ env.PYTHON_VERSION }}" }}

- name: Install poetry
run: pip install poetry
Expand All @@ -78,7 +81,7 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: {{ "${{ env.PYTHON_VERSION }}" }}
cache: poetry

- name: Install dependencies
Expand Down
7 changes: 5 additions & 2 deletions poetry_snakemake_plugin/templates/release_please.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:

name: release-please

env:
PYTHON_VERSION: 3.11

jobs:
release-please:
runs-on: ubuntu-latest
Expand All @@ -26,7 +29,7 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: {{ "${{ env.PYTHON_VERSION }}" }}

- name: Install poetry
run: pip install poetry
Expand All @@ -36,7 +39,7 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: {{ "${{ env.PYTHON_VERSION }}" }}
cache: poetry

- name: Install Dependencies using Poetry
Expand Down

0 comments on commit f5f7250

Please sign in to comment.