Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,25 @@ jobs:
with:
python-version-file: "rewrite/.python-version"

- name: Install uv
uses: astral-sh/setup-uv@v4

- name: build-java
run: ./gradlew ${{ env.GRADLE_SWITCHES }} build

- name: build-python
- name: Install dependencies
run: |
cd rewrite
uv python install
uv sync --all-extras

- name: Run tests
run: |
poe test

- name: Run build
run: |
echo "Building project in rewrite"
cd "rewrite"
uv sync --all-extras --dev
uv build

- name: publish-snapshots
if: github.event_name != 'pull_request'
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: "3.12"

- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install uv
uses: astral-sh/setup-uv@v4

- name: publish-candidate
if: contains(github.ref, '-rc.')
Expand Down Expand Up @@ -78,15 +78,18 @@ jobs:
echo "Extracted version: $version"
echo "::set-output name=VERSION::$version"

- name: Set project version with Poetry
- name: Set project version
working-directory: rewrite
run: poetry version ${{ steps.extract_version.outputs.VERSION }}
run: |
uvx --from=toml-cli toml set --toml-path=pyproject.toml project.version ${{ steps.extract_version.outputs.VERSION }}

- name: publish-python
working-directory: rewrite
if: (!contains(github.ref, '-rc.'))
run: |
poetry install --no-interaction --no-ansi
poetry build
poetry publish --username __token__ --password ${{ secrets.PYPI_TOKEN }}
rm -rf .venv
uv python install
uv sync --all-extras
uv build
uv publish --token ${{ secrets.PYPI_TOKEN }}
git restore --staged --worktree . && git clean -fd
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ build/
out/
bin/
example-data/
.idea/
.idea/

.DS_Store
9 changes: 1 addition & 8 deletions rewrite/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,7 @@ description = "OpenRewrite is a mass automated refactoring engine."
version = "0.0.0" # Updated dynamically during release
authors = [{ name = "Moderne Inc.", email = "support@moderne.io" }]
license = { text = "Moderne, Inc. Commercial License" }
dependencies = [
"pytest>=8.3.4",
"more-itertools>=10.4.0",
"openrewrite-remote",
"pip>=24.3.1",
"pypi-simple>=1.6.1",
]
dependencies = ["pytest>=8.3.4", "more-itertools>=10.4.0", "openrewrite-remote"]
requires-python = ">=3.12, <4"

[tool.setuptools.packages.find]
Expand All @@ -24,7 +18,6 @@ exclude = []
[dependency-groups]
dev = [
"pytest==8.3.4",
"pytest-asyncio==0.24.0",
"mypy==1.13.0",
"poethepoet==0.31.1",
"black==24.10.0",
Expand Down
Loading
Loading