Skip to content

Commit 088f8a8

Browse files
committed
Added CI github action
1 parent 79db3eb commit 088f8a8

File tree

2 files changed

+94
-0
lines changed

2 files changed

+94
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: YDB JDBC Driver CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- release*
8+
pull_request:
9+
type: [opened, reopened, edited, synchronize]
10+
11+
jobs:
12+
prepare:
13+
name: Prepare Maven cache
14+
runs-on: ubuntu-latest
15+
16+
env:
17+
MAVEN_ARGS: --batch-mode -Dstyle.color=always
18+
19+
steps:
20+
- name: Checkout YDB JDBC Driver
21+
uses: actions/checkout@v4
22+
with:
23+
path: jdbc
24+
25+
- name: Checkout YDB Java Examples
26+
uses: actions/checkout@v4
27+
with:
28+
repository: ydb-platform/ydb-java-examples
29+
path: examples
30+
31+
- name: Set up Java
32+
uses: actions/setup-java@v4
33+
with:
34+
java-version: 17
35+
distribution: 'temurin'
36+
cache: 'maven'
37+
cache-dependency-path: |
38+
jdbc/pom.xml
39+
40+
- name: Download YDB JDBC Driver dependencies
41+
working-directory: ./jdbc
42+
run: mvn $MAVEN_ARGS dependency:go-offline
43+
44+
- name: Download YDB Java Examples dependencies
45+
working-directory: ./examples
46+
run: mvn $MAVEN_ARGS dependency:go-offline
47+
48+
build:
49+
name: YDB JDBC Driver CI on JDK
50+
runs-on: ubuntu-latest
51+
needs: prepare
52+
53+
strategy:
54+
matrix:
55+
java: [ '8', '11', '17']
56+
57+
env:
58+
MAVEN_ARGS: --batch-mode -Dstyle.color=always -DYDB_DOCKER_ISOLATION=true
59+
60+
steps:
61+
- name: Checkout YDB JDBC Driver
62+
uses: actions/checkout@v4
63+
with:
64+
path: jdbc
65+
66+
- name: Set up Java
67+
uses: actions/setup-java@v4
68+
with:
69+
java-version: ${{ matrix.java }}
70+
distribution: 'temurin'
71+
cache: 'maven'
72+
cache-dependency-path: |
73+
jdbc/pom.xml
74+
75+
- name: Extract YDB JDBC Driver version
76+
working-directory: ./jdbc
77+
run: |
78+
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
79+
echo "JDBC_VERSION=$VERSION" >> "$GITHUB_ENV"
80+
81+
- name: Build YDB JDBC Driver
82+
working-directory: ./jdbc
83+
run: mvn $MAVEN_ARGS install
84+
85+
- name: Checkout YDB Java Examples
86+
uses: actions/checkout@v4
87+
with:
88+
repository: ydb-platform/ydb-java-examples
89+
path: examples
90+
91+
- name: Test examples with Maven
92+
working-directory: ./examples
93+
run: mvn $MAVEN_ARGS -Dydb.jdbc.version=$JDBC_VERSION test

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/ydb-platform/ydb-jdbc-driver/blob/master/LICENSE)
22
[![Maven metadata URL](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Frepo1.maven.org%2Fmaven2%2Ftech%2Fydb%2Fjdbc%2Fydb-jdbc-driver%2Fmaven-metadata.xml)](https://mvnrepository.com/artifact/tech.ydb.jdbc/ydb-jdbc-driver)
33
[![Build](https://img.shields.io/github/actions/workflow/status/ydb-platform/ydb-jdbc-driver/build.yaml)](https://github.com/ydb-platform/ydb-jdbc-driver/actions/workflows/build.yaml)
4+
[![CI](https://img.shields.io/github/actions/workflow/status/ydb-platform/ydb-jdbc-driver/ci.yaml?label=CI)](https://github.com/ydb-platform/ydb-jdbc-driver/actions/workflows/ci.yaml)
45
[![Codecov](https://img.shields.io/codecov/c/github/ydb-platform/ydb-jdbc-driver)](https://app.codecov.io/gh/ydb-platform/ydb-jdbc-driver)
56

67
## JDBC Driver for YDB

0 commit comments

Comments
 (0)