File tree Expand file tree Collapse file tree 2 files changed +18
-11
lines changed
src/test/java/com/dhh/apiRestSpringboot3 Expand file tree Collapse file tree 2 files changed +18
-11
lines changed Original file line number Diff line number Diff line change @@ -13,20 +13,27 @@ jobs:
13
13
runs-on : ubuntu-latest
14
14
15
15
services :
16
- docker :
17
- image : docker:dind
18
- options : --privileged
16
+ postgres :
17
+ image : postgres:16
19
18
ports :
20
- - 2375:2375
19
+ - 5432:5432
20
+ env :
21
+ POSTGRES_USER : ${{ secrets.DB_USER }}
22
+ POSTGRES_PASSWORD : ${{ secrets.DB_PASSWORD }}
23
+ POSTGRES_DB : postgres
24
+ options : >-
25
+ --health-cmd="pg_isready"
26
+ --health-interval=10s
27
+ --health-timeout=5s
28
+ --health-retries=5
29
+
30
+ env :
31
+ DB_USER : ${{ secrets.DB_USER }}
32
+ DB_PASSWORD : ${{ secrets.DB_PASSWORD }}
21
33
22
34
steps :
23
35
- uses : actions/checkout@v4
24
36
25
- - name : Set up Docker
26
- run : |
27
- sudo apt-get update
28
- sudo apt-get install docker-compose -y
29
-
30
37
- name : Set up JDK 21
31
38
uses : actions/setup-java@v4
32
39
with :
39
46
- name : Build and Test with Maven and Testcontainers
40
47
run : ./mvnw clean verify
41
48
env :
42
- DOCKER_HOST : tcp://localhost:2375
49
+ DB_USER : ${{ secrets.DB_USER }}
50
+ DB_PASSWORD : ${{ secrets.DB_PASSWORD }}
Original file line number Diff line number Diff line change 6
6
import org .springframework .boot .test .context .SpringBootTest ;
7
7
8
8
@ SpringBootTest
9
- @ Disabled ("Temporalmente deshabilitado para GitHub Actions" )
10
9
class ApiRestSpringboot3ApplicationTests {
11
10
12
11
@ Test
You can’t perform that action at this time.
0 commit comments