Skip to content

Commit

Permalink
Use python version from project file in workflows (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
weltenwort authored Jan 8, 2024
1 parent 7131a66 commit ba48bf0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: pyproject.toml

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ on:
schedule:
- cron: "0 0 * * *"

env:
DEFAULT_PYTHON: "3.11"

jobs:
pre-commit:
runs-on: "ubuntu-latest"
Expand All @@ -24,10 +21,10 @@ jobs:
- name: Install poetry
run: pipx install poetry

- name: Set up Python ${{ env.DEFAULT_PYTHON }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.DEFAULT_PYTHON }}
python-version-file: pyproject.toml
cache: "poetry"

- name: Install Python modules
Expand Down Expand Up @@ -65,10 +62,10 @@ jobs:
# steps:
# - name: Check out code from GitHub
# uses: "actions/checkout@v3"
# - name: Setup Python ${{ env.DEFAULT_PYTHON }}
# - name: Setup Python
# uses: "actions/setup-python@v5"
# with:
# python-version: ${{ env.DEFAULT_PYTHON }}
# python-version-file: pyproject.toml
# - name: Install requirements
# run: |
# pip install --constraint=.github/workflows/constraints.txt pip
Expand Down

0 comments on commit ba48bf0

Please sign in to comment.