[CI] Added tests against CH head #4
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: Test with CH HEAD | |
| on: | |
| schedule: | |
| - cron: "55 10 * * *" | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - "**.md" | |
| - "**/docs/**" | |
| - "**/LICENSE" | |
| - "**/NOTICE" | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| paths-ignore: | |
| - "**.md" | |
| - "**/docs/**" | |
| - "**/LICENSE" | |
| - "**/NOTICE" | |
| workflow_dispatch: | |
| inputs: | |
| pr: | |
| description: "Pull request#" | |
| required: false | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.number || github.sha }} | |
| cancel-in-progress: true | |
| env: | |
| CH_VERSION: "head" | |
| jobs: | |
| test-java-client: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| project: ["clickhouse-http-client", "client-v2"] | |
| fail-fast: false | |
| timeout-minutes: 15 | |
| name: Java client ( ${{ matrix.project }} ) + CH HEAD | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Check out PR | |
| run: | | |
| git fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 \ | |
| origin pull/${{ github.event.inputs.pr }}/merge:merged-pr && git checkout merged-pr | |
| if: github.event.inputs.pr != '' | |
| - name: Install JDK 17 and Maven | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: "temurin" | |
| java-version: | | |
| 8 | |
| 17 | |
| cache: "maven" | |
| - name: Setup Toolchain | |
| shell: bash | |
| run: | | |
| mkdir -p $HOME/.m2 \ | |
| && cat << EOF > $HOME/.m2/toolchains.xml | |
| <?xml version="1.0" encoding="UTF8"?> | |
| <toolchains> | |
| <toolchain> | |
| <type>jdk</type> | |
| <provides> | |
| <version>17</version> | |
| </provides> | |
| <configuration> | |
| <jdkHome>${{ env.JAVA_HOME }}</jdkHome> | |
| </configuration> | |
| </toolchain> | |
| </toolchains> | |
| EOF | |
| - name: Test Java client | |
| run: | | |
| mvn --also-make --batch-mode --no-transfer-progress --projects ${{ matrix.project }} -DclickhouseVersion=$CH_VERSION -Dmaven.javadoc.skip=true clean install | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: result ${{ github.job }}_HEAD | |
| path: | | |
| **/target/failsafe-reports | |
| **/target/surefire-reports | |
| retention-days: 5 | |
| test-jdbc-driver: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| protocol: ["apache_http_client"] | |
| fail-fast: false | |
| timeout-minutes: 20 | |
| name: JDBC driver + CH HEAD (${{ matrix.protocol }}) | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Check out PR | |
| run: | | |
| git fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 \ | |
| origin pull/${{ github.event.inputs.pr }}/merge:merged-pr && git checkout merged-pr | |
| if: github.event.inputs.pr != '' | |
| - name: Install JDK 17 and Maven | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: "temurin" | |
| java-version: | | |
| 8 | |
| 17 | |
| cache: "maven" | |
| - name: Setup Toolchain | |
| shell: bash | |
| run: | | |
| mkdir -p $HOME/.m2 \ | |
| && cat << EOF > $HOME/.m2/toolchains.xml | |
| <?xml version="1.0" encoding="UTF8"?> | |
| <toolchains> | |
| <toolchain> | |
| <type>jdk</type> | |
| <provides> | |
| <version>17</version> | |
| </provides> | |
| <configuration> | |
| <jdkHome>${{ env.JAVA_HOME }}</jdkHome> | |
| </configuration> | |
| </toolchain> | |
| </toolchains> | |
| EOF | |
| - name: Test JDBC driver | |
| run: | | |
| mvn --batch-mode --no-transfer-progress --projects clickhouse-jdbc,jdbc-v2 -DclickhouseVersion=$CH_VERSION -Dprotocol=${{ matrix.protocol }} -Dmaven.javadoc.skip=true clean install | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: result ${{ github.job }}_${{ matrix.project }}_HEAD | |
| path: | | |
| **/target/failsafe-reports | |
| **/target/surefire-reports | |
| test-r2dbc-driver: | |
| runs-on: ubuntu-latest | |
| needs: test-jdbc-driver | |
| strategy: | |
| matrix: | |
| protocol: ["http"] | |
| r2dbc: ["1.0.0.RELEASE", "0.9.1.RELEASE"] | |
| fail-fast: false | |
| timeout-minutes: 10 | |
| name: R2DBC ${{ matrix.r2dbc }} + CH HEAD (${{ matrix.protocol }}) | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Check out PR | |
| run: | | |
| git fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 \ | |
| origin pull/${{ github.event.inputs.pr }}/merge:merged-pr && git checkout merged-pr | |
| if: github.event.inputs.pr != '' | |
| - name: Install JDK 17 and Maven | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: "temurin" | |
| java-version: | | |
| 8 | |
| 17 | |
| cache: "maven" | |
| - name: Setup Toolchain | |
| shell: bash | |
| run: | | |
| mkdir -p $HOME/.m2 \ | |
| && cat << EOF > $HOME/.m2/toolchains.xml | |
| <?xml version="1.0" encoding="UTF8"?> | |
| <toolchains> | |
| <toolchain> | |
| <type>jdk</type> | |
| <provides> | |
| <version>17</version> | |
| </provides> | |
| <configuration> | |
| <jdkHome>${{ env.JAVA_HOME }}</jdkHome> | |
| </configuration> | |
| </toolchain> | |
| </toolchains> | |
| EOF | |
| - name: Test R2DBC ${{ matrix.r2dbc }} | |
| run: | | |
| mvn --batch-mode --no-transfer-progress --projects clickhouse-r2dbc -DclickhouseVersion=$CH_VERSION \ | |
| -D'r2dbc-spi.version=${{ matrix.r2dbc }}' -Dprotocol=${{ matrix.protocol }} -Dmaven.javadoc.skip=true clean install | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: result ${{ github.job }} | |
| path: | | |
| **/target/failsafe-reports | |
| **/target/surefire-reports |