|
| 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 | +
|
0 commit comments