CI #322
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: | |
| pull_request: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 7 * * *' | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| MVND_VERSION: '1.0.5' | |
| jobs: | |
| linux: | |
| runs-on: ubuntu-latest | |
| name: Java ${{ matrix.java }} | |
| strategy: | |
| matrix: | |
| java: [8, 11, 17] | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5 | |
| with: | |
| java-version: ${{ matrix.java }} | |
| distribution: temurin | |
| cache: maven | |
| - name: Install mvnd | |
| id: mvnd | |
| uses: ./.github/actions/setup-mvnd | |
| with: | |
| version: ${{ env.MVND_VERSION }} | |
| - name: Build | |
| run: ${{ steps.mvnd.outputs.mvn_cmd }} verify | |
| - name: Upload Maven Timeline | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: maven-timeline-linux-java-${{ matrix.java }} | |
| path: target/timeline/ | |
| macOS: | |
| if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
| runs-on: macOS-latest | |
| name: Java ${{ matrix.java }} | |
| strategy: | |
| matrix: | |
| java: [11] | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5 | |
| with: | |
| java-version: ${{ matrix.java }} | |
| distribution: temurin | |
| cache: maven | |
| - name: Install mvnd | |
| id: mvnd | |
| uses: ./.github/actions/setup-mvnd | |
| with: | |
| version: ${{ env.MVND_VERSION }} | |
| - name: Tests | |
| run: ${{ steps.mvnd.outputs.mvn_cmd }} verify | |
| - name: Upload Maven Timeline | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: maven-timeline-macos-java-${{ matrix.java }} | |
| path: target/timeline/ | |
| windows: | |
| if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
| runs-on: windows-latest | |
| name: Java ${{ matrix.java }} | |
| strategy: | |
| matrix: | |
| java: [11] | |
| env: | |
| # Force UTF-8 so the mvnd daemon log is written in UTF-8, | |
| # matching DaemonDiagnostics.tail() which reads it as UTF-8. | |
| # Without this, Windows Cp1252 bytes in the log cause | |
| # MalformedInputException when mvnd reports diagnostics. | |
| JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5 | |
| with: | |
| java-version: ${{ matrix.java }} | |
| distribution: temurin | |
| cache: maven | |
| - name: Install mvnd | |
| id: mvnd | |
| uses: ./.github/actions/setup-mvnd | |
| with: | |
| version: ${{ env.MVND_VERSION }} | |
| - name: Tests | |
| run: ${{ steps.mvnd.outputs.mvn_cmd }} verify | |
| - name: Upload Maven Timeline | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: maven-timeline-windows-java-${{ matrix.java }} | |
| path: target/timeline/ | |
| testcontainers: | |
| runs-on: ubuntu-latest | |
| name: Java ${{ matrix.java }} | |
| strategy: | |
| matrix: | |
| java: [11] | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5 | |
| with: | |
| java-version: ${{ matrix.java }} | |
| distribution: temurin | |
| cache: maven | |
| - name: Install mvnd | |
| id: mvnd | |
| uses: ./.github/actions/setup-mvnd | |
| with: | |
| version: ${{ env.MVND_VERSION }} | |
| - name: Build | |
| run: ${{ steps.mvnd.outputs.mvn_cmd }} install -DskipTests | |
| - name: Tests | |
| run: ${{ steps.mvnd.outputs.mvn_cmd }} verify -P testcontainers -f ./sql/sql-testcontainers-test/pom.xml | |
| - name: Upload Maven Timeline | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: maven-timeline-testcontainers-java-${{ matrix.java }} | |
| path: sql/sql-testcontainers-test/target/timeline/ | |