Skip to content

feat: Spring Data JDBC added README.md and run examples #5

feat: Spring Data JDBC added README.md and run examples

feat: Spring Data JDBC added README.md and run examples #5

name: Spring Data JDBC YDB Dialect CI with Maven
on:
push:
paths:
- 'spring-data-jdbc-ydb/**'
branches:
- main
pull_request:
paths:
- 'spring-data-jdbc-ydb/**'
env:
MAVEN_ARGS: --batch-mode --update-snapshots -Dstyle.color=always
jobs:
build:
name: Spring Data JDBC YDB Dialect
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '17', '21' ]
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{matrix.java}}
uses: actions/setup-java@v4
with:
java-version: ${{matrix.java}}
distribution: 'temurin'
cache: maven
- name: Extract spring-data-jdbc YDB dialect version
working-directory: ./spring-data-jdbc-ydb
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "SPRING_DATA_JDBC_DIALECT_VERSION=$VERSION" >> "$GITHUB_ENV"
- name: Download spring-data-jdbc YDB dialect dependencies
working-directory: ./spring-data-jdbc-ydb
run: mvn $MAVEN_ARGS dependency:go-offline
- name: Build spring-data-jdbc YDB dialect
working-directory: ./spring-data-jdbc-ydb
run: mvn $MAVEN_ARGS install
- uses: actions/checkout@v4
with:
repository: ydb-platform/ydb-java-examples
ref: master
path: examples
- name: Download dependencies
working-directory: ./examples/jdbc/spring-data-jdbc
run: mvn $MAVEN_ARGS -Dspring.data.jdbc.ydb.version=$SPRING_DATA_JDBC_DIALECT_VERSION dependency:go-offline
- name: Test examples with Maven
working-directory: ./examples/jdbc/spring-data-jdbc
run: mvn $MAVEN_ARGS -Dspring.data.jdbc.ydb.version=$SPRING_DATA_JDBC_DIALECT_VERSION test