Skip to content

Commit 7f7a334

Browse files
ci: move to GitHub actions
1 parent 5c41f34 commit 7f7a334

File tree

5 files changed

+103
-31
lines changed

5 files changed

+103
-31
lines changed

.github/workflows/ci.yml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
- cron: '0 0 * * 0'
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
jdk-version:
16+
- 8
17+
- 11
18+
- 14
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v3
23+
24+
- name: Set up JDK ${{ matrix.jdk-version }}
25+
uses: actions/setup-java@v3
26+
with:
27+
java-version: ${{ matrix.jdk-version }}
28+
distribution: adopt
29+
cache: maven
30+
31+
- name: Test with Maven
32+
run: mvn test
33+
34+
test-postgres:
35+
runs-on: ubuntu-latest
36+
37+
services:
38+
postgres:
39+
image: postgres
40+
env:
41+
POSTGRES_PASSWORD: postgres
42+
options: >-
43+
--health-cmd pg_isready
44+
--health-interval 10s
45+
--health-timeout 5s
46+
--health-retries 5
47+
ports:
48+
- 5432:5432
49+
50+
steps:
51+
- name: Checkout repository
52+
uses: actions/checkout@v3
53+
54+
- name: Set up JDK 14
55+
uses: actions/setup-java@v3
56+
with:
57+
java-version: 14
58+
distribution: adopt
59+
cache: maven
60+
61+
- name: Test with Maven
62+
run: mvn -B test
63+
env:
64+
spring_profiles_active: pgsql
65+
66+
test-mysql:
67+
runs-on: ubuntu-latest
68+
69+
services:
70+
mysql:
71+
image: mysql:5.7
72+
env:
73+
MYSQL_DATABASE: test
74+
MYSQL_ROOT_PASSWORD: changeit
75+
options: >-
76+
--health-cmd="mysqladmin ping"
77+
--health-interval 10s
78+
--health-timeout 5s
79+
--health-retries 5
80+
ports:
81+
- 3306:3306
82+
83+
steps:
84+
- name: Checkout repository
85+
uses: actions/checkout@v3
86+
87+
- name: Set up JDK 14
88+
uses: actions/setup-java@v3
89+
with:
90+
java-version: 14
91+
distribution: adopt
92+
cache: maven
93+
94+
- name: Test with Maven
95+
run: mvn -B test
96+
env:
97+
spring_profiles_active: mysql

.travis.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build Status](https://api.travis-ci.org/darrachequesne/spring-data-jpa-datatables.svg?branch=master)](https://travis-ci.org/darrachequesne/spring-data-jpa-datatables)
1+
[![Build Status](https://github.com/darrachequesne/spring-data-mongodb-datatables/workflows/CI/badge.svg?branch=main)](https://github.com/darrachequesne/spring-data-mongodb-datatables/actions)
22
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.darrachequesne/spring-data-jpa-datatables/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.darrachequesne/spring-data-jpa-datatables)
33

44
# spring-data-jpa-datatables

src/test/java/org/springframework/data/jpa/datatables/Config.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public DataSource dataSource_MySQL() throws SQLException {
4141
dataSource.setDriverClassName("com.mysql.jdbc.Driver");
4242
dataSource.setUrl("jdbc:mysql://127.0.0.1/test");
4343
dataSource.setUsername("root");
44-
dataSource.setPassword("");
44+
dataSource.setPassword("changeit");
4545
return dataSource;
4646
}
4747

@@ -50,9 +50,9 @@ public DataSource dataSource_MySQL() throws SQLException {
5050
public DataSource dataSource_PostgreSQL() throws SQLException {
5151
DriverManagerDataSource dataSource = new DriverManagerDataSource();
5252
dataSource.setDriverClassName("org.postgresql.Driver");
53-
dataSource.setUrl("jdbc:postgresql://127.0.0.1/test");
53+
dataSource.setUrl("jdbc:postgresql://127.0.0.1/postgres");
5454
dataSource.setUsername("postgres");
55-
dataSource.setPassword("");
55+
dataSource.setPassword("postgres");
5656
return dataSource;
5757
}
5858

src/test/resources/log4j.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ log4j.appender.console.layout=org.apache.log4j.PatternLayout
44
log4j.appender.console.layout.ConversionPattern=%d{ABSOLUTE} %5p %40.40c:%4L - %m%n
55
log4j.appender.console=org.apache.log4j.ConsoleAppender
66

7-
log4j.logger.org.springframework=INFO
8-
log4j.logger.org.hibernate.SQL=DEBUG
7+
#log4j.logger.org.springframework=INFO
8+
#log4j.logger.org.hibernate.SQL=DEBUG

0 commit comments

Comments
 (0)