Bump github/codeql-action from 4.31.2 to 4.31.3 #2807
This file contains hidden or 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
| name: Rhino CI | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| permissions: read-all | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - java-version: "11" | |
| name: "Java 11" | |
| multithread: false | |
| - java-version: "17" | |
| name: "Java 17" | |
| multithread: false | |
| - java-version: "21" | |
| name: "Java 21" | |
| multithread: false | |
| - java-version: "21" | |
| name: "Java 21 Multithreaded" | |
| multithread: true | |
| name: ${{ matrix.name }} | |
| 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 | |
| with: | |
| java-version: | | |
| ${{ matrix.java-version }} | |
| 21 | |
| distribution: 'adopt' | |
| - name: Build and test ${{ matrix.name }} | |
| env: | |
| RHINO_TEST_JAVA_VERSION: ${{ matrix.java-version }} | |
| run: >- | |
| ./gradlew check ${{ matrix.multithread && '-Drhino.useThreadSafeObjectsByDefault=true' || '' }} | |
| - name: Upload results ${{ matrix.name }} | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| if: ${{ always() }} | |
| with: | |
| name: reports-java-${{ matrix.java-version }}-${{ matrix.multithread }} | |
| path: '*/build/reports' | |
| test262: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out Rhino | |
| uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v4.2.2 | |
| - name: Check out test262 | |
| run: git submodule update --init --single-branch | |
| - name: Set up Java | |
| uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0 | |
| with: | |
| java-version: | | |
| 11 | |
| 21 | |
| distribution: 'adopt' | |
| - name: Check current state of test262.properties | |
| id: hashBefore | |
| run: echo "hash=${{ hashFiles('./tests/testsrc/test262.properties') }}" >> $GITHUB_OUTPUT | |
| - name: Run test262 tests | |
| # Currently Java 11 is required to have a reproducible result | |
| 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 |