File tree Expand file tree Collapse file tree 2 files changed +11
-21
lines changed
Expand file tree Collapse file tree 2 files changed +11
-21
lines changed Original file line number Diff line number Diff line change @@ -36,32 +36,22 @@ jobs:
3636 - name : check-java
3737 run : java --version
3838
39- - name : Install Python
40- uses : actions/setup-python@v5
41- with :
42- python-version : ' 3.12'
39+ - name : Install Uv
40+ uses : astral-sh/setup-uv@v4
4341
44- - name : Install Poetry
45- uses : snok/install-poetry@v1
42+ - name : " Set up Python "
43+ uses : actions/setup-python@v5
4644 with :
47- version : 1.8.1
48- plugins : poetry-plugin-export
45+ python-version-file : " rewrite/.python-version"
4946
5047 - name : build-java
5148 run : ./gradlew ${{ env.GRADLE_SWITCHES }} build
5249
5350 - name : build-python
5451 run : |
55- for directory in rewrite/rewrite-*/; do
56- if [ -f "$directory/pyproject.toml" ]; then
57- echo "Building project in $directory"
58- cd "$directory"
59- poetry install --no-interaction --no-ansi
60- poetry build
61- poetry run pytest
62- cd - > /dev/null
63- fi
64- done
52+ echo "Building project in rewrite"
53+ cd "rewrite"
54+ uv sync --all-extras --dev
6555
6656 - name : publish-snapshots
6757 if : github.event_name != 'pull_request'
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ dependencies {
3030 testImplementation(" org.junit-pioneer:junit-pioneer:latest.release" )
3131}
3232
33- val poetryProjectDir = file(" ../rewrite" )
33+ val pythonProjectDir = file(" ../rewrite" )
3434val outputDir = layout.buildDirectory.dir(" resources/main/META-INF" )
3535val requirementsFile = outputDir.map { it.file(" python-requirements.txt" ) }
3636
@@ -42,8 +42,8 @@ tasks.register("prepareOutputDir") {
4242
4343tasks.register<Exec >(" exportPoetryRequirements" ) {
4444 dependsOn(" prepareOutputDir" )
45- workingDir = poetryProjectDir
46- commandLine(" sh" , " -c" , " poetry export --without- hashes -o ${requirementsFile.get().asFile.absolutePath} " )
45+ workingDir = pythonProjectDir
46+ commandLine(" sh" , " -c" , " uv export --no-header --frozen --no- hashes --no-dev -o ${requirementsFile.get().asFile.absolutePath} " )
4747 standardOutput = System .out
4848 errorOutput = System .err
4949}
You can’t perform that action at this time.
0 commit comments