Skip to content

Commit 1aba7ae

Browse files
ci: replace the former workflow for a new one
its aim is to validate the backend (Java Spring application)
1 parent ed803e2 commit 1aba7ae

2 files changed

Lines changed: 32 additions & 39 deletions

File tree

.github/workflows/maven.yml

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

.github/workflows/springApp.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Project - Spring Boot application
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
services:
13+
mysql:
14+
image: mysql:8.0
15+
env:
16+
MYSQL_ROOT_PASSWORD: password
17+
MYSQL_DATABASE: testdb
18+
ports:
19+
- 3306:3306
20+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Set up JDK
24+
uses: actions/setup-java@v4
25+
26+
- name: Run Tests
27+
run: mvn test
28+
env:
29+
# Override properties to point to the service container
30+
SPRING_DATASOURCE_URL: jdbc:mysql://localhost:3306/testdb
31+
SPRING_DATASOURCE_USERNAME: root
32+
SPRING_DATASOURCE_PASSWORD: password

0 commit comments

Comments
 (0)