-
Notifications
You must be signed in to change notification settings - Fork 623
[CI] Added tests against CH head #2644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
cb4a63b
added tests against CH head
chernser f4022b0
fixed name and env variable reference
chernser c3e3400
Simplified pipeline
chernser 0af5716
fixed head version name
chernser 0f2eedc
cleanup workflow
chernser b17865f
cleanup workflow
chernser 845138a
cleanup workflow
chernser 1604e2f
removed trigger on pr changes
chernser File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,252 @@ | ||
| name: Nightly | ||
|
|
||
| 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: | ||
| compile: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| name: Compile (JDK 8) | ||
| 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 8 and Maven | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: "temurin" | ||
| java-version: | | ||
| 8 | ||
| 21 | ||
| cache: "maven" | ||
| - name: Build and install libraries | ||
| run: mvn --batch-mode --no-transfer-progress --show-version --strict-checksums --threads 2 -Dmaven.wagon.rto=30000 -Dj8 -DskipITs install | ||
| - name: Copy Artifacts to Build dir | ||
| run: | | ||
| mkdir clickhouse-jdbc-artifacts | ||
| cp -rf $HOME/.m2/repository/com/clickhouse/clickhouse-jdbc/* ./clickhouse-jdbc-artifacts/ | ||
| - name: Compile examples | ||
| run: | | ||
| export LIB_VER=$(grep '<revision>' pom.xml | sed -e 's|[[:space:]]*<[/]*revision>[[:space:]]*||g') | ||
| find `pwd`/examples -type f -name pom.xml -exec sed -i -e "s|\(<clickhouse-java.version>\).*\(<\)|\1$LIB_VER\2|g" {} \; | ||
| for d in $(ls -d `pwd`/examples/*/); do \ | ||
| if [ -e $d/pom.xml ]; then cd $d && mvn --batch-mode --no-transfer-progress clean compile; fi; | ||
| if [ -e $d/gradlew ]; then cd $d && ./gradlew clean build; fi; | ||
| done | ||
| - name: Save clickhouse-jdbc-all for tests | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: clickhouse-jdbc-archive | ||
| path: clickhouse-jdbc-artifacts/ | ||
| retention-days: 5 | ||
|
|
||
| test-java-client: | ||
| runs-on: ubuntu-latest | ||
| needs: compile | ||
| strategy: | ||
| matrix: | ||
| project: ["clickhouse-http-client", "client-v2"] | ||
| fail-fast: false | ||
| timeout-minutes: 15 | ||
| name: Java client ( ${{ matrix.project }} ) + CH ${{ env.CH_VERSION }} | ||
| 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: Build and install libraries | ||
| run: mvn --batch-mode --no-transfer-progress --show-version --strict-checksums --threads 2 -Dmaven.wagon.rto=30000 -Dj8 -DskipTests=true -Dmaven.javadoc.skip=true install | ||
| - name: Test Java client | ||
| run: | | ||
| mvn --also-make --batch-mode --no-transfer-progress --projects ${{ matrix.project }} -DclickhouseVersion=${{ env.CH_VERSION }} -Dmaven.javadoc.skip=true verify | ||
| - name: Upload test results | ||
| uses: actions/upload-artifact@v4 | ||
| if: failure() | ||
| with: | ||
| name: result ${{ github.job }}_${{ env.CH_VERSION }} | ||
| path: | | ||
| **/target/failsafe-reports | ||
| **/target/surefire-reports | ||
| retention-days: 5 | ||
|
|
||
| test-jdbc-driver: | ||
| runs-on: ubuntu-latest | ||
| needs: test-java-client | ||
| strategy: | ||
| matrix: | ||
| protocol: ["apache_http_client"] | ||
| fail-fast: false | ||
| timeout-minutes: 20 | ||
| name: JDBC driver + CH ${{ env.CH_VERSION }} (${{ 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: Install Java client | ||
| run: mvn --also-make --batch-mode --no-transfer-progress --projects clickhouse-http-client,client-v2 -DskipTests=true -Dmaven.javadoc.skip=true install | ||
| - name: Test JDBC driver | ||
| run: | | ||
| mvn --batch-mode --no-transfer-progress --projects clickhouse-jdbc,jdbc-v2 -DclickhouseVersion=${{ env.CH_VERSION }} -Dprotocol=${{ matrix.protocol }} -Dmaven.javadoc.skip=true verify | ||
| - name: Upload test results | ||
| uses: actions/upload-artifact@v4 | ||
| if: failure() | ||
| with: | ||
| name: result ${{ github.job }}_${{ matrix.project }}_${{ env.CH_VERSION }} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The upload-artifact step uses |
||
| 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 ${{ env.CH_VERSION }} (${{ 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: Install Java client | ||
| run: mvn --also-make --no-transfer-progress --batch-mode --projects clickhouse-jdbc -DskipTests=true -Dmaven.javadoc.skip=true install | ||
| - name: Test R2DBC ${{ matrix.r2dbc }} | ||
| run: | | ||
| mvn --batch-mode --no-transfer-progress --projects clickhouse-r2dbc -DclickhouseVersion=${{ env.CH_VERSION}} \ | ||
| -D'r2dbc-spi.version=${{ matrix.r2dbc }}' -Dprotocol=${{ matrix.protocol }} -Dmaven.javadoc.skip=true verify | ||
| - name: Upload test results | ||
| uses: actions/upload-artifact@v4 | ||
| if: failure() | ||
| with: | ||
| name: result ${{ github.job }} | ||
| path: | | ||
| **/target/failsafe-reports | ||
| **/target/surefire-reports | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow name 'Nightly' doesn't match the file name 'test_head.yml' or the workflow's purpose (testing against CH HEAD). Consider renaming it to something more descriptive like 'Test Against ClickHouse HEAD' for clarity.