deps: update jetbrains/qodana-action action to v2025.2.3 #19783
Workflow file for this run
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: Build and Test | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| env: | |
| GRADLE_OPTS: -Dorg.gradle.daemon=false -Dkotest.assertions.multi-line-diff=unified | |
| REGISTRY: ghcr.io | |
| TEST_IMAGE_TAG: ort:test | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-24.04, windows-2025] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - name: Setup Java | |
| uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5 | |
| - name: Build all classes | |
| run: ./gradlew classes | |
| codeql-analysis: | |
| needs: build | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| # Needed for SARIF scanning upload. | |
| security-events: write | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@fe4161a26a8629af62121b670040955b330f9af2 # v4 | |
| with: | |
| languages: java | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5 | |
| - name: Build all classes | |
| run: ./gradlew -Dorg.gradle.jvmargs=-Xmx1g --no-build-cache classes | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@fe4161a26a8629af62121b670040955b330f9af2 # v4 | |
| test: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-24.04, windows-2025] | |
| fail-fast: false | |
| runs-on: ${{ matrix.os }} | |
| needs: build | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - name: Setup Java | |
| uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5 | |
| - name: Install Flox | |
| uses: flox/install-flox-action@ba0eb4eb776f1d3b47279d7980f6643caffd8c41 # v2 | |
| with: | |
| disable-metrics: true | |
| if: runner.os != 'Windows' | |
| - name: Run unit tests in a minimal environment | |
| run: ./flox/run_isolated.sh minimal ./gradlew --scan test jacocoTestReport | |
| if: runner.os != 'Windows' | |
| - name: Run unit tests | |
| run: ./gradlew --scan test jacocoTestReport | |
| if: runner.os == 'Windows' | |
| - name: Create Test Summary | |
| uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2 | |
| with: | |
| paths: "**/test-results/**/TEST-*.xml" | |
| if: always() | |
| - name: Upload code coverage data | |
| uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| flags: test-${{ matrix.os }} | |
| funTest-no-external-tools: | |
| needs: build | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5 | |
| - name: Install Flox | |
| uses: flox/install-flox-action@ba0eb4eb776f1d3b47279d7980f6643caffd8c41 # v2 | |
| with: | |
| disable-metrics: true | |
| - name: Run functional tests that do not require external tools | |
| run: ./flox/run_isolated.sh minimal ./gradlew --scan -Dkotest.tags=!RequiresExternalTool funTest jacocoFunTestReport | |
| - name: Create Test Summary | |
| uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2 | |
| with: | |
| paths: "**/test-results/**/TEST-*.xml" | |
| if: always() | |
| - name: Upload code coverage data | |
| uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| flags: funTest-no-external-tools | |
| funTest-external-tools: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| with: | |
| submodules: recursive | |
| - name: Free Disk Space | |
| uses: ./.github/actions/free-disk-space | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3 | |
| - name: Build ORT Docker Image | |
| uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6 | |
| with: | |
| context: . | |
| load: true | |
| tags: ${{ env.TEST_IMAGE_TAG }} | |
| target: all-tools | |
| cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ github.repository_owner }}/ort:cache | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5 | |
| - name: Run functional tests that do require external tools | |
| run: | | |
| # Run the functional tests in the Docker container. | |
| docker run \ | |
| -u $(id -u):$(id -g) \ | |
| -v /etc/group:/etc/group:ro \ | |
| -v /etc/passwd:/etc/passwd:ro \ | |
| -v /home/runner:/home/runner \ | |
| -v ${{ github.workspace }}:/workspace \ | |
| -w /workspace \ | |
| -e HOME=/home/runner \ | |
| -e GRADLE_OPTS="$GRADLE_OPTS" \ | |
| ${{ env.TEST_IMAGE_TAG }} \ | |
| -c "./gradlew --scan -Dkotest.tags=RequiresExternalTool funTest jacocoFunTestReport" | |
| - name: Create Test Summary | |
| uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2 | |
| with: | |
| paths: "**/test-results/**/TEST-*.xml" | |
| if: always() | |
| - name: Upload code coverage data | |
| uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| flags: funTest-external-tools |