Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ jobs:
MSSQL_SA_PASSWORD: "veryStrong123"
ports:
- 1433:1433

steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
Expand All @@ -49,9 +48,31 @@ jobs:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Run Tests with MSSQL
- name: Run tests with MSSQL
run: mvn test -pl core -am -Dspring.profiles.active=mssql

test-postgres:
runs-on: ubuntu-latest
needs: build
services:
postgres:
image: postgres
options: --name pg-container
env:
POSTGRES_USER: sa
POSTGRES_PASSWORD: veryStrong123
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Run tests with postgres
run: mvn test -pl core -am -Dspring.profiles.active=postgres

java-doc:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -84,7 +105,7 @@ jobs:

maven-deploy:
runs-on: ubuntu-latest
needs: [build, test-mssql]
needs: [build, test-mssql, test-postgres]
if: ${{ github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions RUN_AND_BUILD.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
mvn versions:display-dependency-updates
mvn versions:set -DnewVersion=1.2.0 -DgenerateBackupPoms=false
mvn versions:set -DnewVersion=1.2.1-SNAPSHOT -DgenerateBackupPoms=false
mvn versions:set -DnewVersion=1.2.1 -DgenerateBackupPoms=false
mvn versions:set -DnewVersion=1.2.2-SNAPSHOT -DgenerateBackupPoms=false

docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=veryStrong123" -p 1433:1433 -d mcr.microsoft.com/mssql/server:2022-latest
docker run --name pg-container -e POSTGRES_USER=sa -e POSTGRES_PASSWORD=veryStrong123 -p 5432:5432 -d postgres

docker run --cap-add SYS_PTRACE -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=veryStrong123' -p 1433:1433 --name azuresqledge -d mcr.microsoft.com/azure-sql-edge
7 changes: 6 additions & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.sterl.spring</groupId>
<artifactId>spring-persistent-tasks-root</artifactId>
<version>1.2.1-SNAPSHOT</version>
<version>1.2.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down Expand Up @@ -84,6 +84,11 @@
<artifactId>mssql-jdbc</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public void updateRunningDuration() {
private Long runningDurationInMs;

@Lob
@Column(name = "state")
private byte[] state;

@Column(length = 512)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.transaction.support.TransactionTemplate;
import org.sterl.spring.persistent_tasks.api.SpringBeanTask;
import org.sterl.spring.persistent_tasks.api.TaskId;
Expand All @@ -33,7 +34,7 @@
import uk.co.jemos.podam.api.PodamFactory;
import uk.co.jemos.podam.api.PodamFactoryImpl;

//@ActiveProfiles("mssql")
//@ActiveProfiles("postgres") // postgres mssql
@SpringBootTest(classes = SampleApp.class, webEnvironment = WebEnvironment.RANDOM_PORT)
public class AbstractSpringTest {

Expand Down
11 changes: 11 additions & 0 deletions core/src/test/resources/application-postgres.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
spring:
datasource:
username: sa
password: veryStrong123
url: jdbc:postgresql://localhost:5432/postgres
driver-class-name: org.postgresql.Driver
hikari:
maximum-pool-size: 100
jpa:
hibernate:
ddl-auto: none
2 changes: 1 addition & 1 deletion db/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.sterl.spring</groupId>
<artifactId>spring-persistent-tasks-root</artifactId>
<version>1.2.1-SNAPSHOT</version>
<version>1.2.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<property name="offsetdatetime.type" value="DATETIME(6)" dbms="mysql,mariadb" />

<property name="binary.type" value="varbinary(MAX)" dbms="mssql" />
<property name="binary.type" value="BYTEA" dbms="postgresql" />
<property name="binary.type" value="oid" dbms="postgresql" />
<property name="binary.type" value="BLOB" dbms="h2" />
<property name="binary.type" value="LONGBLOB" dbms="mysql,mariadb" />

Expand Down
2 changes: 1 addition & 1 deletion example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.sterl.spring</groupId>
<artifactId>spring-persistent-tasks-root</artifactId>
<version>1.2.1-SNAPSHOT</version>
<version>1.2.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<groupId>org.sterl.spring</groupId>
<artifactId>spring-persistent-tasks-root</artifactId>
<version>1.2.1-SNAPSHOT</version>
<version>1.2.2-SNAPSHOT</version>
<packaging>pom</packaging>

<inceptionYear>2024</inceptionYear>
Expand Down
2 changes: 1 addition & 1 deletion ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.sterl.spring</groupId>
<artifactId>spring-persistent-tasks-root</artifactId>
<version>1.2.1-SNAPSHOT</version>
<version>1.2.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Loading