Skip to content

Commit

Permalink
chore(ci): add .python-version file for setup-python@v4
Browse files Browse the repository at this point in the history
the new actions/setup-python@v4 requires either a python-version or python-version-file param
(there is no default version)

use python-version-file so we can point to a common file in multiple workflows
  • Loading branch information
thekaveman committed Jun 9, 2022
1 parent 7d61ec7 commit 5872b52
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/.python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.9
4 changes: 4 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version-file: .github/workflows/.python-version

- uses: pre-commit/[email protected]
2 changes: 1 addition & 1 deletion .github/workflows/tests-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version-file: .github/workflows/.python-version
cache: pip
cache-dependency-path: '**/requirements.txt'

Expand Down

0 comments on commit 5872b52

Please sign in to comment.