Added support of Spring Boot4 to YDB Spring JDBC Dialect #30
This file contains hidden or 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: 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: | |
| prepare: | |
| name: Prepare Maven cache | |
| runs-on: ubuntu-24.04 | |
| 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 (Spring Boot 3) | |
| working-directory: ./spring-data-jdbc-ydb | |
| run: mvn $MAVEN_ARGS -Pspring-boot3 dependency:resolve-plugins dependency:go-offline | |
| - name: Download dependencies (Spring Boot 4) | |
| working-directory: ./spring-data-jdbc-ydb | |
| run: mvn $MAVEN_ARGS -Pspring-boot4 dependency:resolve-plugins dependency:go-offline | |
| build: | |
| name: Spring Data JDBC YDB Dialect build & tests | |
| runs-on: ubuntu-24.04 | |
| needs: prepare | |
| strategy: | |
| matrix: | |
| java: [ '17', '21', '24' ] | |
| 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: Build spring-data-jdbc YDB dialect | |
| working-directory: ./spring-data-jdbc-ydb | |
| run: mvn $MAVEN_ARGS -DskipTests=true package | |
| - name: Tests with Spring Boot 3 | |
| working-directory: ./spring-data-jdbc-ydb | |
| run: mvn $MAVEN_ARGS -Pspring-boot3 test | |
| - name: Tests with Spring Boot 4 | |
| working-directory: ./spring-data-jdbc-ydb | |
| run: mvn $MAVEN_ARGS -Pspring-boot3 test | |
| examples: | |
| name: Spring Data JDBC YDB Dialect Examples | |
| runs-on: ubuntu-24.04 | |
| needs: build | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: 17 | |
| 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: 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 |