Skip to content

Commit

Permalink
Add basic check in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jmao-denver committed May 7, 2024
1 parent 6fdfed3 commit 48aee74
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Check

on:
pull_request:
branches: [ 'master', 'release/v*' ]
push:
branches: [ 'master', 'release/v*' ]

jobs:
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '8'

- run: pip install --upgrade setuptools

- name: Run Test
run: python setup.py test
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ def _read(filename):
def test_python_java_rt():
""" Run Python test cases against Java runtime classes. """
sub_env = {'PYTHONPATH': _build_dir()}
import os
sub_env.update(dict(os.environ))

log.info('Executing Python unit tests (against Java runtime classes)...')
return jpyutil._execute_python_scripts(python_java_rt_tests, env=sub_env)
Expand All @@ -210,6 +212,8 @@ def test_python_java_rt():
def test_python_java_classes():
""" Run Python tests against JPY test classes """
sub_env = {'PYTHONPATH': _build_dir()}
import os
sub_env.update(dict(os.environ))

log.info('Executing Python unit tests (against JPY test classes)...')
return jpyutil._execute_python_scripts(python_java_jpy_tests, env=sub_env)
Expand Down

0 comments on commit 48aee74

Please sign in to comment.