Skip to content

Fix length with default arguments #2631

Fix length with default arguments

Fix length with default arguments #2631

Workflow file for this run

name: Rhino CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
permissions: read-all
jobs:
build:
runs-on: ubuntu-latest
strategy:
# Some tests require more CPU, and all can use multiple CPUs
max-parallel: 1
name: Rhino Tests
steps:
- name: Check out Rhino
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v4.2.2
- name: Check out test262
# We don't actually want all the history for this part
run: git submodule update --init --single-branch
- name: Set up Java
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
# By putting JVMs in reverse order, the last one is the one that
# will go in the path.
with:
java-version: |
11
17
21
distribution: 'adopt'
- name: Build and test Java 21
run: >-
./gradlew check
- name: Upload results Java 21
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: ${{ always() }}
with:
name: reports-java-21
path: '*/build/reports'
- name: Build and test Java 17
env:
RHINO_TEST_JAVA_VERSION: "17"
run: >-
./gradlew check
- name: Upload results Java 17
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: ${{ always() }}
with:
name: reports-java-17
path: '*/build/reports'
- name: Build and test Java 11
env:
RHINO_TEST_JAVA_VERSION: "11"
run: >-
./gradlew check
- name: Upload results Java 11
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: ${{ always() }}
with:
name: reports-java-11
path: '*/build/reports'
- name: Build and test Java 21 - Multithread
timeout-minutes: 30
run: >-
./gradlew check -Drhino.useThreadSafeObjectsByDefault=true
- name: Upload results Java 21 - Multithread
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: ${{ always() }}
with:
name: reports-java-21-multithread
path: '*/build/reports'
- name: Check current state of test262.properties
id: hashBefore
run: echo "hash=${{ hashFiles('./tests/testsrc/test262.properties') }}" >> $GITHUB_OUTPUT
- name: Run test262 tests
env:
RHINO_TEST_JAVA_VERSION: "11"
run: >-
./gradlew :tests:test --tests Test262SuiteTest -DupdateTest262properties
- name: Check updated state of test262.properties
id: hashAfter
run: echo "hash=${{ hashFiles('./tests/testsrc/test262.properties') }}" >> $GITHUB_OUTPUT
- name: Compare test262 results
run: |
if [ "${{ steps.hashBefore.outputs.hash }}" != "${{ steps.hashAfter.outputs.hash }}" ]; then
echo "The test262.properties file was not updated properly."
echo "Please follow the instructions in tests/README.md to update it."
git --no-pager diff ./tests/testsrc/test262.properties
exit 1
else
echo "The test262.properties file is up to date."
fi