forked from jython/jython
-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (60 loc) · 2.35 KB
/
launcher-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# 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-latest
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@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
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