Update render_tck_job_summary #1403
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: Trevas CI | |
| on: | |
| push: | |
| pull_request: | |
| types: [ opened, synchronize, reopened ] | |
| jobs: | |
| format: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: "temurin" | |
| java-version: 17 | |
| - name: Cache Maven dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-maven- | |
| - name: Verify code format with Spotless | |
| run: mvn spotless:check | |
| test-excluding-vtl-sdmx: | |
| name: Run Trevas tests excluding vtl-sdmx module | |
| runs-on: ubuntu-latest | |
| needs: format | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Maven Central Repository | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: 17 | |
| distribution: "adopt" | |
| # Also exclude vtl-prov because of vtl-sdmx scope test dependency | |
| - name: Test | |
| run: mvn install -pl vtl-parser && mvn test -pl '!vtl-sdmx,!vtl-prov' | |
| test: | |
| name: Run Trevas tests | |
| if: (github.repository != 'InseeFr/Trevas' && | |
| github.event_name == 'push') || | |
| (github.event.pull_request.head.repo.fork == true || | |
| (github.event.pull_request.head.repo.fork == false && | |
| github.event.pull_request.merged == false)) | |
| runs-on: ubuntu-latest | |
| needs: format | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Maven Central Repository | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: 17 | |
| distribution: "adopt" | |
| - uses: s4u/maven-settings-action@v4.0.0 | |
| with: | |
| githubServer: false | |
| servers: | | |
| [{ | |
| "id": "Github", | |
| "username": "${{ secrets.GH_PACKAGES_USERNAME }}", | |
| "password": "${{ secrets.GH_PACKAGES_PASSWORD }}" | |
| }] | |
| - name: Test | |
| run: mvn install -pl vtl-parser && mvn test | |
| spark-integration: | |
| name: Spark ${{ matrix.spark-label }} | |
| runs-on: ubuntu-latest | |
| needs: format | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - module: vtl-spark | |
| spark-label: "3.x (Scala 2.12)" | |
| extra-args: "" | |
| - module: vtl-spark4 | |
| spark-label: "4.x (Scala 2.13)" | |
| extra-args: "" | |
| - module: vtl-prov | |
| spark-label: "vtl-prov + Spark 4 (tests)" | |
| extra-args: "-Pspark4-tests" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: 17 | |
| distribution: temurin | |
| - name: Cache Maven dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-maven- | |
| - uses: s4u/maven-settings-action@v4.0.0 | |
| with: | |
| githubServer: false | |
| servers: | | |
| [{ | |
| "id": "Github", | |
| "username": "${{ secrets.GH_PACKAGES_USERNAME }}", | |
| "password": "${{ secrets.GH_PACKAGES_PASSWORD }}" | |
| }] | |
| # Install shaded vtl-parser first, then exclude it from the reactor so dependent | |
| # modules resolve the installed jar (JPMS fr.insee.vtl.parser.shaded), not target/classes. | |
| - name: Test ${{ matrix.module }} (and upstream modules) | |
| run: mvn install -pl vtl-parser -DskipTests && mvn -B test -pl ${{ matrix.module }} -am --projects '!vtl-parser' ${{ matrix.extra-args }} | |
| package: | |
| name: Package Trevas modules | |
| # Filter thanks to test job | |
| runs-on: ubuntu-latest | |
| needs: [ test, spark-integration ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Maven Central Repository | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: 17 | |
| distribution: "adopt" | |
| - uses: s4u/maven-settings-action@v4.0.0 | |
| with: | |
| githubServer: false | |
| servers: | | |
| [{ | |
| "id": "Github", | |
| "username": "${{ secrets.GH_PACKAGES_USERNAME }}", | |
| "password": "${{ secrets.GH_PACKAGES_PASSWORD }}" | |
| }] | |
| - name: Test | |
| run: mvn package | |
| # test-sonar-package: | |
| # name: Run Trevas tests with coverage & sonar checks | |
| # Trevas main repo commit branch or merged PR | |
| # if: github.repository == 'InseeFr/Trevas' && | |
| # (github.event_name == 'push' || | |
| # github.event.pull_request.head.repo.fork == false || | |
| # (github.event.pull_request.head.repo.fork == true && | |
| # github.event.pull_request.merged == true)) | |
| # runs-on: ubuntu-latest | |
| # needs: format | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # with: | |
| # fetch-depth: 0 | |
| # - name: Set up Maven Central Repository | |
| # uses: actions/setup-java@v4 | |
| # with: | |
| # java-version: 17 | |
| # distribution: "adopt" | |
| # - uses: s4u/maven-settings-action@v3.0.0 | |
| # with: | |
| # githubServer: false | |
| # servers: | | |
| # [{ | |
| # "id": "Github", | |
| # "username": "${{ secrets.GH_PACKAGES_USERNAME }}", | |
| # "password": "${{ secrets.GH_PACKAGES_PASSWORD }}" | |
| # }] | |
| # - name: Test, package and analyze with maven & SonarCloud | |
| # run: mvn verify sonar:sonar -Pcoverage -Dsonar.projectKey=InseeFr_Trevas -Dsonar.organization=inseefr -Dsonar.host.url=https://sonarcloud.io | |
| # env: | |
| # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| publish-release: | |
| name: Publish Trevas modules on Maven | |
| if: startsWith(github.event.ref, 'refs/tags/v') | |
| # Temp update because of sonar token issue | |
| needs: [ test, spark-integration ] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Import GPG Key | |
| uses: crazy-max/ghaction-import-gpg@v7 | |
| env: | |
| GPG_PRIVATE_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | |
| PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | |
| - uses: s4u/maven-settings-action@v4.0.0 | |
| with: | |
| githubServer: false | |
| servers: | | |
| [ | |
| { | |
| "id": "Github", | |
| "username": "${{ secrets.GH_PACKAGES_USERNAME }}", | |
| "password": "${{ secrets.GH_PACKAGES_PASSWORD }}" | |
| }, | |
| { | |
| "id": "central", | |
| "username": "${{ secrets.MAVEN_CENTRAL_USERNAME }}", | |
| "password": "${{ secrets.MAVEN_CENTRAL_TOKEN }}" | |
| } | |
| ] | |
| - name: Publish Trevas | |
| run: mvn -B deploy -Prelease -DskipTests=true --no-transfer-progress | |
| env: | |
| MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} | |
| MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_TOKEN }} | |
| MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} |