-
Notifications
You must be signed in to change notification settings - Fork 623
79 lines (75 loc) · 3.04 KB
/
run_examples.yml
File metadata and controls
79 lines (75 loc) · 3.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Run Examples
on:
workflow_dispatch:
inputs:
ch_version:
description: ClickHouse Version
required: false
default: 25.8
client_version:
description: Build Type
type: choice
options:
- head
- nightly
nightly_version:
description: Nightly Version
required: false
default: 0.9.6-SNAPSHOT
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.number || github.sha }}
cancel-in-progress: true
jobs:
run-examples-with-8-jdk-and-latest:
if: github.event.inputs.client_version == 'head'
runs-on: ubuntu-latest
timeout-minutes: 15
name: Run Examples With HEAD on JVM 8
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install JDK 11 and Maven
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 17
cache: "maven"
- name: Install libraries
run: |
java -version
mvn --batch-mode --no-transfer-progress --show-version --strict-checksums --threads 2 -Dmaven.wagon.rto=30000 -DskipITs install
- name: Install JDK 8 and Maven
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 8
cache: "maven"
- name: Run Examples
run: |
java -version
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 }}
cd examples/jdbc
mvn --batch-mode --no-transfer-progress --show-version clean compile
mvn --no-transfer-progress exec:java -Dexec.mainClass="com.clickhouse.examples.jdbc.Basic" -DchPassword=secret -DfailOnError=true
run-examples-with-8-jdk-and-staging-release:
if: github.event.inputs.client_version == 'nightly'
runs-on: ubuntu-latest
timeout-minutes: 15
name: Run Examples With Pre-Release on JVM 8
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install JDK 8 and Maven
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 8
cache: "maven"
- name: Run JDBC Example
run: |
java -version
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 }}
cd examples/jdbc
sed -i "s|<clickhouse-java.version>.*<\/clickhouse-java.version>|<clickhouse-java.version>${{ github.event.inputs.nightly_version }}<\/clickhouse-java.version>|g" pom.xml
mvn --batch-mode --no-transfer-progress --show-version clean compile
mvn --no-transfer-progress exec:java -Dexec.mainClass="com.clickhouse.examples.jdbc.Basic" -DchPassword=secret -DfailOnError=true