fix: avoid NPE in trustedLookup on environments without IMPL_LOOKUP, for issue #4011 #8165
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: CI | |
| on: | |
| push: | |
| # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-excluding-paths | |
| paths-ignore: | |
| - 'docs/**' | |
| - '**.md' | |
| pull_request: | |
| paths-ignore: | |
| - 'docs/**' | |
| - '**.md' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pull-requests: write # Allow posting PR comments for coverage reports | |
| env: | |
| JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Duser.timezone=Asia/Shanghai | |
| jobs: | |
| test: | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| max-parallel: 16 | |
| matrix: | |
| java: [ 8, 11, 17, 21, 25 ] | |
| os: [ ubuntu-24.04, windows-latest, macos-latest ] | |
| exclude: | |
| # Exclude JDK 25 on macOS (not yet supported) | |
| - java: 25 | |
| os: macos-latest | |
| name: Test JDK ${{ matrix.java }} on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: zulu | |
| java-version: ${{ matrix.java }} | |
| cache: maven | |
| - name: Build with Maven | |
| run: ./mvnw -V --no-transfer-progress -Pgen-javadoc -Pgen-dokka clean package | |
| test-reflect: | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| max-parallel: 16 | |
| matrix: | |
| java: [ 8, 11, 17, 21, 25 ] | |
| os: [ ubuntu-24.04, windows-latest, macos-latest ] | |
| exclude: | |
| - java: 25 | |
| os: macos-latest | |
| name: Test Reflect JDK ${{ matrix.java }} on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: zulu | |
| java-version: ${{ matrix.java }} | |
| cache: maven | |
| - name: Build with Maven | |
| run: ./mvnw -V --no-transfer-progress -Dfastjson2.creator=reflect clean package | |
| shell: bash | |
| coverage: | |
| timeout-minutes: 20 | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Fetch all history for better coverage analysis | |
| - name: Set up JDK 11 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: zulu | |
| java-version: 11 | |
| cache: maven | |
| - name: Build with Maven and generate coverage | |
| run: ./mvnw -V --no-transfer-progress clean package | |
| env: | |
| CI: true # Explicitly set CI to ensure JaCoCo profile is activated | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| name: codecov-umbrella | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| flags: unittests | |
| fail_ci_if_error: false | |
| verbose: true |