Added support of jdbc_table macro #241
This file contains 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: Build YDB JDBC Driver | |
on: | |
push: | |
branches: | |
- master | |
- develop | |
- release* | |
pull_request: | |
type: [opened, reopened, edited, synchronize] | |
jobs: | |
prepare: | |
name: Prepare Maven cache | |
runs-on: ubuntu-latest | |
env: | |
MAVEN_ARGS: --batch-mode -Dstyle.color=always | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '8' | |
distribution: 'temurin' | |
cache: 'maven' | |
- name: Download dependencies for JDBC | |
run: mvn $MAVEN_ARGS dependency:resolve-plugins dependency:go-offline | |
build: | |
name: Build JDBC Driver | |
runs-on: ubuntu-latest | |
needs: prepare | |
strategy: | |
matrix: | |
java: [ '8', '11', '17'] | |
env: | |
MAVEN_ARGS: --batch-mode --update-snapshots -Dstyle.color=always -DYDB_DOCKER_ISOLATION=true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: 'temurin' | |
cache: 'maven' | |
- name: Extract SDK version | |
run: | | |
VERSION=$(mvn help:evaluate -Dexpression=ydb.sdk.version -q -DforceStdout) | |
echo "SDK_VERSION=$VERSION" >> "$GITHUB_ENV" | |
- name: Check SDK version | |
run: | | |
echo "NEED_SDK=${{ endsWith(env.SDK_VERSION, 'SNAPSHOT') }}" >> "$GITHUB_ENV" | |
- name: Checkout YDB Java SDK | |
if: env.NEED_SDK == 'true' | |
uses: actions/checkout@v4 | |
with: | |
repository: ydb-platform/ydb-java-sdk | |
ref: master | |
path: ydb-java-sdk | |
- name: Build YDB Java SDK | |
working-directory: ./ydb-java-sdk | |
if: env.NEED_SDK == 'true' | |
run: mvn $MAVEN_ARGS install | |
- name: Remove YDB Java SDK | |
if: env.NEED_SDK == 'true' | |
run: rm -rf ydb-java-sdk | |
- name: Checkout YC Auth provider | |
if: env.NEED_SDK == 'true' | |
uses: actions/checkout@v4 | |
with: | |
repository: ydb-platform/ydb-java-yc | |
ref: master | |
path: yc | |
- name: Build YC Auth provider | |
working-directory: ./yc | |
if: env.NEED_SDK == 'true' | |
run: mvn $MAVEN_ARGS install | |
- name: Remove YC Auth provider | |
if: env.NEED_SDK == 'true' | |
run: rm -rf yc | |
- name: Build with Maven | |
run: mvn $MAVEN_ARGS package | |
coverage: | |
if: github.repository == 'ydb-platform/ydb-jdbc-driver' | |
name: Coverage JDBC Driver | |
runs-on: ubuntu-latest | |
needs: build | |
env: | |
MAVEN_ARGS: --batch-mode --update-snapshots -Dstyle.color=always | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 8 | |
distribution: 'temurin' | |
cache: 'maven' | |
- name: Extract SDK version | |
run: | | |
VERSION=$(mvn help:evaluate -Dexpression=ydb.sdk.version -q -DforceStdout) | |
echo "SDK_VERSION=$VERSION" >> "$GITHUB_ENV" | |
- name: Check SDK version | |
run: | | |
echo "NEED_SDK=${{ endsWith(env.SDK_VERSION, 'SNAPSHOT') }}" >> "$GITHUB_ENV" | |
- name: Checkout YDB Java SDK | |
if: env.NEED_SDK == 'true' | |
uses: actions/checkout@v4 | |
with: | |
repository: ydb-platform/ydb-java-sdk | |
ref: master | |
path: ydb-java-sdk | |
- name: Build YDB Java SDK | |
working-directory: ./ydb-java-sdk | |
if: env.NEED_SDK == 'true' | |
run: mvn $MAVEN_ARGS install | |
- name: Remove YDB Java SDK | |
if: env.NEED_SDK == 'true' | |
run: rm -rf ydb-java-sdk | |
- name: Checkout YC Auth provider | |
if: env.NEED_SDK == 'true' | |
uses: actions/checkout@v4 | |
with: | |
repository: ydb-platform/ydb-java-yc | |
ref: master | |
path: yc | |
- name: Build YC Auth provider | |
working-directory: ./yc | |
if: env.NEED_SDK == 'true' | |
run: mvn $MAVEN_ARGS install | |
- name: Remove YC Auth provider | |
if: env.NEED_SDK == 'true' | |
run: rm -rf yc | |
- name: Build with Maven | |
run: mvn $MAVEN_ARGS test | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |