Skip to content

Commit

Permalink
Merge pull request #551 from gruelbox/better-spring-example
Browse files Browse the repository at this point in the history
Better example code for Spring Boot
  • Loading branch information
badgerwithagun authored Mar 23, 2024
2 parents 37f36ca + f88b5f1 commit c17221d
Show file tree
Hide file tree
Showing 30 changed files with 719 additions and 534 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/cd_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ jobs:
build:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up JDK 21
uses: actions/setup-java@v2
with:
Expand All @@ -21,7 +19,6 @@ jobs:
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
cache: 'maven'

- name: Build, publish to GPR and tag
run: |
if [ "$GITHUB_REPOSITORY" == "gruelbox/transaction-outbox" ]; then
Expand All @@ -32,7 +29,7 @@ jobs:
git tag $revision
git push origin $revision
else
mvn -Pconcise,delombok -B package -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
mvn -Pconcise,delombok,only-nodb-tests -B package -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
fi
env:
GITHUB_TOKEN: ${{ github.token }}
41 changes: 40 additions & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,52 @@ on:
branches: [ master ]

jobs:
format-and-delombok:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-package: jdk
java-version: 21
cache: 'maven'
- name: Build with Maven
run: mvn -Pconcise,delombok -B fmt:check package -DskipTests -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
- uses: actions/upload-artifact@v4
with:
name: javadocs-core
path: transactionoutbox-core/target/apidocs
- uses: actions/upload-artifact@v4
with:
name: javadocs-guice
path: transactionoutbox-guice/target/apidocs
- uses: actions/upload-artifact@v4
with:
name: javadocs-jackson
path: transactionoutbox-jackson/target/apidocs
- uses: actions/upload-artifact@v4
with:
name: javadocs-jooq
path: transactionoutbox-jooq/target/apidocs
- uses: actions/upload-artifact@v4
with:
name: javadocs-quarkus
path: transactionoutbox-quarkus/target/apidocs
- uses: actions/upload-artifact@v4
with:
name: javadocs-spring
path: transactionoutbox-spring/target/
build:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
jdk: [ 11,17,21 ]
db: [ nodb,mysql,postgres,oracle18,oracle21 ]
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand All @@ -23,4 +62,4 @@ jobs:
java-version: ${{ matrix.jdk }}
cache: 'maven'
- name: Build with Maven
run: mvn -Pconcise -B fmt:check package -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
run: mvn -Pconcise,only-${{ matrix.db }}-tests -B package -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
55 changes: 0 additions & 55 deletions .github/workflows/pull_request_delombok.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/test-update-versions.yml

This file was deleted.

77 changes: 77 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,83 @@
</plugins>
</build>
</profile>
<profile>
<id>only-nodb-tests</id>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/*Oracle*.java</exclude>
<exclude>**/*Postgres*.java</exclude>
<exclude>**/*MySql*.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>only-oracle18-tests</id>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>**/*Oracle18*.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>only-oracle21-tests</id>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>**/*Oracle21*.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>only-postgres-tests</id>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>**/*Postgres*.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>only-mysql-tests</id>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>**/*MySql*.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<licenses>
<license>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ class TestOracle18 extends AbstractAcceptanceTest {
@SuppressWarnings("rawtypes")
private static final JdbcDatabaseContainer container =
new OracleContainer("gvenzl/oracle-xe:18-slim-faststart")
.withStartupTimeout(Duration.ofHours(1))
.withReuse(true);
.withStartupTimeout(Duration.ofHours(1));

@Override
protected ConnectionDetails connectionDetails() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ class TestOracle21 extends AbstractAcceptanceTest {
@SuppressWarnings("rawtypes")
private static final JdbcDatabaseContainer container =
new OracleContainer("gvenzl/oracle-xe:21-slim-faststart")
.withStartupTimeout(Duration.ofHours(1))
.withReuse(true);
.withStartupTimeout(Duration.ofHours(1));

@Override
protected ConnectionDetails connectionDetails() {
Expand Down
Loading

0 comments on commit c17221d

Please sign in to comment.