Skip to content

Commit a122ec9

Browse files
committed
added job for pre-release
1 parent 5b5497d commit a122ec9

File tree

1 file changed

+43
-6
lines changed

1 file changed

+43
-6
lines changed

.github/workflows/run_examples.yml

Lines changed: 43 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,33 @@ name: Run Examples
22

33
on:
44
workflow_dispatch:
5-
5+
inputs:
6+
ch_version:
7+
description: ClickHouse Version
8+
required: false
9+
default: 24.8
10+
client_version:
11+
description: ClickHouse Java Version
12+
type: choice
13+
options:
14+
- latest
15+
- pre_release
16+
pre_release_version:
17+
description: Client Release Version
18+
required: false
19+
default: 0.9.0
20+
621
concurrency:
722
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.number || github.sha }}
823
cancel-in-progress: true
924

10-
env:
11-
PREFERRED_LTS_VERSION: "24.3"
1225

1326
jobs:
14-
run-examples-with-8-jdk:
27+
run-examples-with-8-jdk-and-latest:
28+
if: github.event.inputs.client_version == 'latest'
1529
runs-on: ubuntu-latest
1630
timeout-minutes: 15
17-
name: Run Examples (JVM 8)
31+
name: Run Examples With HEAD on JVM 8
1832
steps:
1933
- name: Check out repository
2034
uses: actions/checkout@v4
@@ -37,7 +51,30 @@ jobs:
3751
- name: Run Examples
3852
run: |
3953
java -version
40-
docker run -d -q --name demo-service-db -e CLICKHOUSE_USER=default -e CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1 -e CLICKHOUSE_PASSWORD=secret -p 8123:8123 clickhouse/clickhouse-server:${PREFERRED_LTS_VERSION}
54+
docker run -d -q --name demo-service-db -e CLICKHOUSE_USER=default -e CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1 -e CLICKHOUSE_PASSWORD=secret -p 8123:8123 clickhouse/clickhouse-server:${{ github.event.inputs.ch_version }}
55+
cd examples/jdbc
56+
mvn --batch-mode --no-transfer-progress --show-version clean compile
57+
mvn --no-transfer-progress exec:java -Dexec.mainClass="com.clickhouse.examples.jdbc.Basic" -DchPassword=secret -DfailOnError=true
58+
run-examples-with-8-jdk-and-staging-release:
59+
if: github.event.inputs.client_version == 'pre_release'
60+
runs-on: ubuntu-latest
61+
timeout-minutes: 15
62+
name: Run Examples With Pre-Release on JVM 8
63+
steps:
64+
- name: Check out repository
65+
uses: actions/checkout@v4
66+
- name: Install JDK 8 and Maven
67+
uses: actions/setup-java@v4
68+
with:
69+
distribution: "temurin"
70+
java-version: 8
71+
cache: "maven"
72+
- name: Run Examples
73+
run: |
74+
java -version
75+
docker run -d -q --name demo-service-db -e CLICKHOUSE_USER=default -e CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1 -e CLICKHOUSE_PASSWORD=secret -p 8123:8123 clickhouse/clickhouse-server:${{ github.event.inputs.ch_version }}
4176
cd examples/jdbc
77+
sed -i "s|<clickhouse-java.version>.*<\/clickhouse-java.version>|<clickhouse-java.version>${{ github.event.inputs.pre_release_version }}<\/clickhouse-java.version>|g" pom.xml
78+
sed -i "s|<url>https:\/\/s01\.oss\.sonatype\.org\/content\/repositories\/snapshots\/<\/url>|<url>https:\/\/s01\.oss\.sonatype\.org\/content\/groups\/staging\/<\/url>|g" pom.xml
4279
mvn --batch-mode --no-transfer-progress --show-version clean compile
4380
mvn --no-transfer-progress exec:java -Dexec.mainClass="com.clickhouse.examples.jdbc.Basic" -DchPassword=secret -DfailOnError=true

0 commit comments

Comments
 (0)