Skip to content

Commit bf69bdb

Browse files
authored
Merge pull request #74 from zalando-stups/gh-73-move-to-gh-actions
Integrate with Github Actions
2 parents 995106a + 3f2a5ff commit bf69bdb

File tree

2 files changed

+48
-1
lines changed

2 files changed

+48
-1
lines changed

.github/workflows/workflow.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# This workflow will build a Java project with Maven
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
3+
4+
name: Build master branch
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
services:
17+
postgres:
18+
image: postgres:13
19+
env:
20+
POSTGRES_PASSWORD: postgres
21+
# Set health checks to wait until postgres has started
22+
options: >-
23+
--health-cmd pg_isready
24+
--health-interval 10s
25+
--health-timeout 5s
26+
--health-retries 5
27+
ports:
28+
- 5432:5432
29+
30+
steps:
31+
- uses: actions/checkout@v2
32+
- name: Set up JDK 11
33+
uses: actions/setup-java@v1
34+
with:
35+
java-version: 11
36+
- name: Cache local Maven repository
37+
uses: actions/cache@v2
38+
with:
39+
path: ~/.m2/repository
40+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
41+
restore-keys: |
42+
${{ runner.os }}-maven-
43+
- name: Build with Maven
44+
run: ./mvnw -B clean verify

src/test/java/org/zalando/sprocwrapper/SimpleIT.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
import java.sql.Statement;
88
import java.sql.Timestamp;
99
import java.text.SimpleDateFormat;
10+
import java.time.LocalDateTime;
11+
import java.time.ZoneId;
1012
import java.util.ArrayList;
1113
import java.util.Arrays;
1214
import java.util.Collections;
@@ -414,7 +416,8 @@ public void testChar() {
414416
@Test
415417
public void testReturnDate() {
416418
final Date d = exampleSProcService.getFixedTestDate();
417-
assertEquals(1328266821000L, d.getTime()); // extract(epoch from '2012-02-03 12:00:21'::timestamp)*1000
419+
final LocalDateTime targetDateTime = LocalDateTime.parse("2012-02-03T12:00:21");
420+
assertEquals(targetDateTime, LocalDateTime.ofInstant(d.toInstant(), ZoneId.systemDefault()));
418421
}
419422

420423
@Test

0 commit comments

Comments
 (0)