Skip to content

Commit 8c276eb

Browse files
committed
Merge branch 'master' into java25-in-stages
This brings in an action for verbose tests on Linux.
2 parents d5d49d4 + d78adb8 commit 8c276eb

2 files changed

Lines changed: 101 additions & 0 deletions

File tree

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Run ant regrtest -f verbose.tests on Jython 2.7 on Java versions (GitHub action)
2+
3+
# We expect this to fail (at the time of writing) and the purpose
4+
# is to tell us on which OSes and versions of Java that happens,
5+
# with details.
6+
7+
name: Java versions regrtest 2.7 (verbose tests)
8+
9+
# Only run manually as we don't want to block every PR.
10+
on:
11+
workflow_dispatch:
12+
# So we may run on demand (with a chosen file)
13+
inputs:
14+
tests_file:
15+
description: 'File containing the names of tests to run'
16+
type: string
17+
required: true
18+
default: 'verbose.tests'
19+
20+
permissions:
21+
contents: read
22+
23+
jobs:
24+
25+
java-versions-regrtest:
26+
strategy:
27+
max-parallel: 2
28+
matrix:
29+
version: [25, 17]
30+
os: [ubuntu-latest]
31+
32+
runs-on: ${{ matrix.os }}
33+
timeout-minutes: 10
34+
continue-on-error: true
35+
36+
steps:
37+
- run: echo "Branch ${{ github.ref }} of repository ${{ github.repository }}."
38+
- run: echo "Java ${{ matrix.version }} on ${{ matrix.os }}."
39+
40+
# Some tests require Python 2.7 available (not sure it is)
41+
- name: Install pyenv for choice of Python version.
42+
# See https://github.com/pyenv/pyenv#installation
43+
run: |
44+
curl -sSL https://pyenv.run | bash
45+
# Manual equivalent of "pyenv init --install".
46+
# Add to subsequent environments through GITHUB_ variables (files)
47+
echo "PYENV_ROOT=$HOME/.pyenv" >> "$GITHUB_ENV"
48+
echo "$HOME/.pyenv/bin" >> "$GITHUB_PATH"
49+
echo "$HOME/.pyenv/shims" >> "$GITHUB_PATH"
50+
51+
- name: Check pyenv has taken.
52+
# See https://github.com/pyenv/pyenv#installation
53+
run: |
54+
echo BASH_ENV = "$BASH_ENV"
55+
echo PYENV_ROOT = "$PYENV_ROOT"
56+
echo PATH = "$PATH"
57+
pyenv versions
58+
59+
- name: Ensure Python 2.7 available
60+
run: |
61+
pyenv install 2.7
62+
pyenv versions
63+
pyenv global 2.7
64+
python -V
65+
66+
# Some tests require exactly-expected line endings
67+
- run: git config --global core.autocrlf input
68+
- uses: actions/checkout@v6
69+
70+
- name: Set up JDK
71+
uses: actions/setup-java@v5
72+
with:
73+
java-version: ${{ matrix.version }}
74+
distribution: 'temurin'
75+
76+
- name: Developer build with Ant
77+
run: ant -noinput -buildfile build.xml developer-build
78+
79+
- name: Specified regression tests with Ant
80+
run: |
81+
python -V
82+
dist/bin/jython -m test.regrtest -v -f ${{ inputs.tests_file }}
83+

verbose.tests

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# verbose.tests
2+
# List of tests referenced by GitHub action java-versions-verbose-tests.yml
3+
# Test with: dist/bin/jython -m test.regrtest -v -f verbose.tests
4+
5+
test_cmd_line
6+
test_float_jy
7+
test_httplib
8+
test_import_jy
9+
test_java_integration
10+
test_java_visibility # warning: Ignoring option --illegal-access=warn;
11+
test_json
12+
test_jy_internals
13+
test_jython_launcher
14+
test_socket # fails Linux (socket in use on rerun)
15+
test_socket_jy # fails Linux (socket in use on rerun)
16+
test_subprocess
17+
test_threading
18+
test_urllib2_localnet

0 commit comments

Comments
 (0)