Note blocked from updating Netty by issue 349 #67
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Test launcher for Jython 2.7 (GitHub action) | |
# The motivation for the test was the mis-handling of JVM arguments | |
# in jython.py, but we take this excuse to run a few tests on macOS, | |
# where we don't currently run the regression test in full. | |
name: launcher test 2.7 | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
permissions: | |
contents: read | |
jobs: | |
launcher-test-macos-jdk8: | |
runs-on: macos-12 # macos-latest (now >12) no longer installs Java 8 | |
# Options at https://github.com/actions/runner-images | |
steps: | |
- run: echo "Branch ${{ github.ref }} of repository ${{ github.repository }}." | |
# Some tests require exactly-expected line endings | |
- run: git config --global core.autocrlf input | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '8' | |
distribution: 'temurin' | |
# We have to install Python 2.7 explicitly | |
# Simplified from https://github.com/LizardByte/setup-python-action specialised for MacOS | |
- name: Set up Python 2 | |
shell: bash | |
run: | | |
python -V | |
# Install using pyenv | |
brew install pyenv | |
export PATH="$(pyenv root)/shims:$(pyenv root)/bin:$PATH" | |
pyenv install 2.7.18 | |
pyenv global 2.7.18 | |
# Get a 2.7 virtual environment | |
python -m pip install virtualenv | |
venv="/tmp/python27/venv" | |
python -m virtualenv ${venv} | |
source ${venv}/bin/activate | |
# Check we got the version we hoped for | |
echo "${venv}/bin" >> $GITHUB_PATH | |
python -V | |
- name: Build with Ant | |
run: ant -noinput -buildfile build.xml | |
- name: Show JVM arguments when launched by script | |
run: dist/bin/jython -c 'from java.lang.management import ManagementFactory; print ManagementFactory.getRuntimeMXBean().getInputArguments()' | |
- name: Show JVM arguments when launched by Python | |
run: | | |
python -V | |
python dist/bin/jython.py -c 'from java.lang.management import ManagementFactory; print ManagementFactory.getRuntimeMXBean().getInputArguments()' | |
- name: Regression tests for invocation of the interpreter with various command line arguments | |
run: dist/bin/jython -m test.test_cmd_line | |
- name: Regression tests for command line execution of scripts | |
run: | | |
python -V | |
python dist/bin/jython.py -m test.test_cmd_line_script | |
- name: Run Java tests with Ant | |
run: ant javatest-ci | |