Skip to content

Commit

Permalink
Update CI action to use JDBC driver tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alex268 committed Sep 25, 2024
1 parent a981125 commit 18cca3f
Showing 1 changed file with 32 additions and 13 deletions.
45 changes: 32 additions & 13 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- master
- develop
- release*
pull_request:
type: [opened, reopened, edited, synchronize]
Expand All @@ -22,18 +21,19 @@ jobs:
MAVEN_ARGS: --batch-mode --update-snapshots -Dstyle.color=always -DYDB_DOCKER_ISOLATION=true

steps:
- uses: actions/checkout@v4
with:
path: sdk

- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: 'maven'

- name: Extract SDK version
- name: Checkout YDB Java SDK
uses: actions/checkout@v4
with:
path: sdk

- name: Extract YDB Java SDK version
working-directory: ./sdk
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
Expand All @@ -45,18 +45,18 @@ jobs:
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "AUTH_API_VERSION=$VERSION" >> "$GITHUB_ENV"
- name: Download YDK SDK dependencies
- name: Download YDB Java SDK dependencies
working-directory: ./sdk
run: mvn $MAVEN_ARGS dependency:go-offline

- name: Build YDB SDK
- name: Build YDB Java SDK
working-directory: ./sdk
run: mvn $MAVEN_ARGS install

- uses: actions/checkout@v4
- name: Checkout YDB YC Auth provider
uses: actions/checkout@v4
with:
repository: ydb-platform/ydb-java-yc
ref: develop
path: yc

- name: Download YDB YC Auth provider dependencies
Expand All @@ -67,16 +67,35 @@ jobs:
working-directory: ./yc
run: mvn $MAVEN_ARGS -Dydb.auth-api.version=$AUTH_API_VERSION install

- name: Checkout YDB JDBC Driver
uses: actions/checkout@v4
with:
repository: ydb-platform/ydb-jdbc-driver
path: jdbc

- name: Extract YDB JDBC Driver version
working-directory: ./jdbc
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "JDBC_VERSION=$VERSION" >> "$GITHUB_ENV"
- name: Download YDB JDBC Driver dependencies
working-directory: ./jdbc
run: mvn $MAVEN_ARGS -Dydb.sdk.version=$SDK_VERSION dependency:go-offline

- name: Build YDB JDBC Driver with tests
working-directory: ./jdbc
run: mvn $MAVEN_ARGS -Dydb.sdk.version=$SDK_VERSION install

- uses: actions/checkout@v4
with:
repository: ydb-platform/ydb-java-examples
ref: master
path: examples

- name: Download dependencies
working-directory: ./examples
run: mvn $MAVEN_ARGS -Dydb.sdk.version=$SDK_VERSION dependency:go-offline
run: mvn $MAVEN_ARGS -Dydb.sdk.version=$SDK_VERSION -Dydb.jdbc.version=$JDBC_VERSION dependency:go-offline

- name: Test examples with Maven
working-directory: ./examples
run: mvn $MAVEN_ARGS -Dydb.sdk.version=$SDK_VERSION test
run: mvn $MAVEN_ARGS -Dydb.sdk.version=$SDK_VERSION -Dydb.jdbc.version=$JDBC_VERSION test

0 comments on commit 18cca3f

Please sign in to comment.