Skip to content

Commit

Permalink
Fix version-file input
Browse files Browse the repository at this point in the history
The input was previously ignored
  • Loading branch information
eifinger committed Feb 6, 2025
1 parent f14634c commit 8c0eaa1
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,23 @@ jobs:
with:
version: ${{ matrix.ruff-version }}
src: __tests__/fixtures/python-project
test-version-from-version-file-pyproject:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use version from pyproject.toml
id: ruff-action
uses: ./
with:
src: __tests__/fixtures/python-project
version-file: __tests__/fixtures/pyproject.toml
- name: Correct version gets installed
run: |
if [ "$RUFF_VERSION" != "0.9.3" ]; then
exit 1
fi
env:
RUFF_VERSION: ${{ steps.ruff-action.outputs.ruff-version }}
test-default-version-from-pyproject:
runs-on: ubuntu-latest
steps:
Expand Down
13 changes: 13 additions & 0 deletions __tests__/fixtures/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[project]
name = "pyython-project"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"ruff==0.9.3",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

0 comments on commit 8c0eaa1

Please sign in to comment.