File tree Expand file tree Collapse file tree
src/test/java/com/dhh/apiRestSpringboot3 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,20 +13,27 @@ jobs:
1313 runs-on : ubuntu-latest
1414
1515 services :
16- docker :
17- image : docker:dind
18- options : --privileged
16+ postgres :
17+ image : postgres:16
1918 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 }}
2133
2234 steps :
2335 - uses : actions/checkout@v4
2436
25- - name : Set up Docker
26- run : |
27- sudo apt-get update
28- sudo apt-get install docker-compose -y
29-
3037 - name : Set up JDK 21
3138 uses : actions/setup-java@v4
3239 with :
3946 - name : Build and Test with Maven and Testcontainers
4047 run : ./mvnw clean verify
4148 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 66import org .springframework .boot .test .context .SpringBootTest ;
77
88@ SpringBootTest
9- @ Disabled ("Temporalmente deshabilitado para GitHub Actions" )
109class ApiRestSpringboot3ApplicationTests {
1110
1211 @ Test
You can’t perform that action at this time.
0 commit comments