Adopt Gradle best practices #1508
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: Unit tests CI | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| permissions: read-all | |
| jobs: | |
| tests: | |
| name: Execute unit tests | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| env: | |
| # bump: FFmpeg /FF_VERSION: '([\d.]+)'/ docker:mwader/static-ffmpeg|/\d+\./|* | |
| FF_VERSION: '9.0' | |
| steps: | |
| - name: Checkout code changes | |
| uses: actions/checkout@v7 | |
| - name: Cache FFmpeg binaries | |
| id: cache-ffmpeg | |
| uses: actions/cache@v6 | |
| with: | |
| path: ${{ runner.temp }}/ffmpeg | |
| key: ffmpeg-static-${{ runner.os }}-${{ env.FF_VERSION }} | |
| - name: Setup FFmpeg | |
| if: steps.cache-ffmpeg.outputs.cache-hit != 'true' | |
| run: | | |
| INSTALL_DIR="$RUNNER_TEMP/ffmpeg" | |
| mkdir -p "$INSTALL_DIR" | |
| CID=$(docker create "mwader/static-ffmpeg:$FF_VERSION") | |
| docker export "$CID" | tar -xf - -C "$INSTALL_DIR" --wildcards 'ff*' | |
| docker rm -v "$CID" > /dev/null | |
| - name: Add FFmpeg to PATH | |
| run: echo "$RUNNER_TEMP/ffmpeg" >> "$GITHUB_PATH" | |
| - name: Setup Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: 26 | |
| - name: Setup project and upload dependency graph | |
| uses: gradle/actions/setup-gradle@v6 | |
| with: | |
| dependency-graph: generate-and-submit | |
| build-scan-publish: true | |
| build-scan-terms-of-use-url: 'https://gradle.com/help/legal-terms-of-use' | |
| build-scan-terms-of-use-agree: 'yes' | |
| - name: Execute tests | |
| run: ./gradlew check | |
| qodana: | |
| name: Perform Qodana analysis | |
| needs: tests | |
| runs-on: ubuntu-latest | |
| permissions: | |
| checks: write | |
| security-events: write | |
| steps: | |
| - name: Checkout code changes | |
| uses: actions/checkout@v7 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha || github.sha }} | |
| fetch-depth: 0 | |
| - name: Execute analysis | |
| uses: JetBrains/qodana-action@v2026.2.0 | |
| env: | |
| QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} | |
| with: | |
| use-caches: false | |
| post-pr-comment: false | |
| pr-mode: false | |
| # bump: Qodana /qodana-jvm-community:([\d.]+)/ docker:jetbrains/qodana-jvm-community|/^[\d]{4}\.\d+$/|sort | |
| args: --image jetbrains/qodana-jvm-community:2026.2 | |
| - name: Upload results to GitHub | |
| if: ${{ !cancelled() }} | |
| uses: github/codeql-action/upload-sarif@v4 | |
| with: | |
| sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json |