Skip to content

Commit b07a395

Browse files
authored
Merge pull request #19
Enable Windows GitHub actions
2 parents 26926ff + 7e6396b commit b07a395

File tree

6 files changed

+24
-5
lines changed

6 files changed

+24
-5
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104
runs-on: ${{ matrix.os }}
105105
strategy:
106106
matrix:
107-
os: [ubuntu-latest, macos-latest] # TODO: windows-latest
107+
os: [ubuntu-latest, macos-latest, windows-latest]
108108
test_name: [ test_jbang_integration.py, test_maven_plugin.py, test_gradle_plugin.py ]
109109
include:
110110
# We need to skip native-image tests on Gradle and MacOS runners: it seems that with
@@ -176,6 +176,14 @@ jobs:
176176
run: choco install jbang
177177
shell: pwsh
178178

179+
# - name: Setup MSVC on Windows
180+
# if: runner.os == 'Windows'
181+
# uses: ilammy/msvc-dev-cmd@v1
182+
183+
- name: Add git utils to $PATH on Windows
184+
if: runner.os == 'Windows'
185+
run: echo "C:\Program Files\Git\usr\bin" >> $env:GITHUB_PATH
186+
179187
- name: Run integration tests
180188
run: |
181189
mvn --batch-mode -s settings.xml -Dgradle.java.home=$GRADLE_JAVA_HOME exec:java@integration-tests -Dintegration.tests.args="${{ matrix.test_name }} ${{ matrix.extra_test_args }} $TEST_FLAGS"
@@ -193,11 +201,13 @@ jobs:
193201
runs-on: ${{ matrix.os }}
194202
strategy:
195203
matrix:
196-
os: [ubuntu-latest, macos-latest] # TODO: windows-latest
204+
os: [ubuntu-latest, macos-latest, windows-latest]
197205
tests: [unit-cp, unit-mp, unit-it-mp, isolate-it]
198-
exclude: # TODO: find out why the resources are not in the bundle (the same for Windows)
206+
exclude: # TODO: isolate resources seem to not be in the bundle for those
199207
- os: macos-latest
200208
tests: isolate-it
209+
- os: windows-latest
210+
tests: isolate-it
201211
include:
202212
- tests: unit-cp
203213
maven_args: "test"

.github/workflows/tests-release-jbang.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ jobs:
2323
- name: Run JBang integration tests
2424
run: |
2525
mvn --batch-mode exec:java@integration-tests \
26-
-Dproject.polyglot.version=24.1.2 \
26+
-Dproject.polyglot.version=24.2.2 \
2727
-Dintegration.tests.args="test_jbang_integration.py \
28-
--jbang-graalpy-version=24.2.1"
28+
--jbang-graalpy-version=24.2.2"

integration-tests/test_gradle_plugin.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,7 @@ def __init__(self, *args, **kwargs):
585585
def setUpClass(cls):
586586
super().setUpClass()
587587

588+
@util.skip_on_windows("ujson installation broken on Windows")
588589
def test_gradle_generated_app(self):
589590
self.check_gradle_generated_app(community=True)
590591

@@ -749,6 +750,7 @@ def setUpClass(cls):
749750
super().setUpClass()
750751

751752
@long_running_test
753+
@util.skip_on_windows("ujson installation broken on Windows")
752754
def test_gradle_generated_app(self):
753755
self.check_gradle_generated_app(community=True)
754756

integration-tests/test_jbang_integration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ def test_hello_example(self):
208208
self.assertIn("Successfully installed termcolor", out)
209209
self.assertIn("hello java", out)
210210

211+
@util.skip_on_windows("ujson installation broken on Windows")
211212
def test_external_dir(self):
212213
work_dir = self.tmpdir
213214
hello_java_file = self.prepare_hello_example(work_dir)

integration-tests/test_maven_plugin.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ def check_generated_app(self, use_default_vfs_path):
187187
util.check_ouput("not compatible with the current platform", out, logger=log)
188188

189189

190+
@util.skip_on_windows("ujson installation broken on Windows")
190191
def test_generated_app(self):
191192
self.check_generated_app(use_default_vfs_path=False)
192193

@@ -577,6 +578,7 @@ def _prepare_multi_project(self, tmpdir, app1_pom_template_name, app2_pom_templa
577578
return app1_dir, app1_mvnw_cmd, app2_dir, app2_mvnw_cmd
578579

579580
@long_running_test
581+
@util.skip_on_windows("ujson installation broken on Windows")
580582
def test_multiple_merged_vfs(self):
581583
if not util.native_image_all():
582584
self.skipTest("native-image tests disabled")
@@ -657,6 +659,7 @@ def test_multiple_merged_vfs(self):
657659
assert return_code == 0, out
658660

659661

662+
@util.skip_on_windows("ujson installation broken on Windows")
660663
def test_multiple_vfs_incompat_libs_error(self):
661664
with util.TemporaryTestDirectory() as tmpdir:
662665
app1_dir, app1_mvnw_cmd, app2_dir, app2_mvnw_cmd = \

integration-tests/util.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ def native_image_smoke():
7070
def long_running_test(func):
7171
return unittest.skipIf(long_running_test_disabled, "passed option --skip-long-running")(func)
7272

73+
def skip_on_windows(justification):
74+
return unittest.skipIf(sys.platform.startswith("win"), "skipped on Windows: " + justification)
75+
7376
class TemporaryTestDirectory():
7477
def __init__(self):
7578
if no_clean:

0 commit comments

Comments
 (0)