Skip to content

Run Examples

Run Examples #13

Workflow file for this run

name: Run Examples
on:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.number || github.sha }}
cancel-in-progress: true
env:
PREFERRED_LTS_VERSION: "24.3"
jobs:
run-examples-with-8-jdk:
runs-on: ubuntu-latest
timeout-minutes: 15
name: Run Examples (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:${PREFERRED_LTS_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