Ajout de postgres sur git et gitea en conteneur docker pour pouvoir exécuter les tests unitaires concernant la BDD
Some checks failed
E2E Tests / e2e (push) Has been cancelled
Tests unitaires / Core (Java · mvn test + JaCoCo) (push) Successful in 1m51s
Build & Push Images / tests (push) Successful in 2m25s
Tests unitaires / Brain (Python · pytest + couverture) (push) Successful in 21s
Tests unitaires / Web (Angular · vitest + couverture) (push) Successful in 22s
Build & Push Images / build (brain) (push) Successful in 1m16s
Build & Push Images / build (core) (push) Successful in 3m20s
Build & Push Images / build (web) (push) Successful in 1m41s
Build & Push Images / build-switcher (push) Successful in 39s
Some checks failed
E2E Tests / e2e (push) Has been cancelled
Tests unitaires / Core (Java · mvn test + JaCoCo) (push) Successful in 1m51s
Build & Push Images / tests (push) Successful in 2m25s
Tests unitaires / Brain (Python · pytest + couverture) (push) Successful in 21s
Tests unitaires / Web (Angular · vitest + couverture) (push) Successful in 22s
Build & Push Images / build (brain) (push) Successful in 1m16s
Build & Push Images / build (core) (push) Successful in 3m20s
Build & Push Images / build (web) (push) Successful in 1m41s
Build & Push Images / build-switcher (push) Successful in 39s
This commit is contained in:
@@ -14,6 +14,22 @@ jobs:
|
|||||||
core:
|
core:
|
||||||
name: Core (Java · mvn test + JaCoCo)
|
name: Core (Java · mvn test + JaCoCo)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
# Les tests Core utilisent une VRAIE base PostgreSQL (cf.
|
||||||
|
# src/test/resources/application.properties, ddl-auto=create-drop).
|
||||||
|
# On en fournit une en service container. Sur Gitea (job en conteneur),
|
||||||
|
# le service est joignable par son NOM d'hôte `postgres`.
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:16-alpine
|
||||||
|
env:
|
||||||
|
POSTGRES_DB: loremind_test
|
||||||
|
POSTGRES_USER: loremind_test
|
||||||
|
POSTGRES_PASSWORD: loremind_test
|
||||||
|
options: >-
|
||||||
|
--health-cmd "pg_isready -U loremind_test -d loremind_test"
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 10
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-java@v4
|
- uses: actions/setup-java@v4
|
||||||
@@ -26,6 +42,10 @@ jobs:
|
|||||||
# `mvn test` exécute aussi jacoco:report + jacoco:check (plancher 60%).
|
# `mvn test` exécute aussi jacoco:report + jacoco:check (plancher 60%).
|
||||||
- name: mvn test (via wrapper)
|
- name: mvn test (via wrapper)
|
||||||
working-directory: core
|
working-directory: core
|
||||||
|
env:
|
||||||
|
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/loremind_test
|
||||||
|
SPRING_DATASOURCE_USERNAME: loremind_test
|
||||||
|
SPRING_DATASOURCE_PASSWORD: loremind_test
|
||||||
run: |
|
run: |
|
||||||
chmod +x ./mvnw
|
chmod +x ./mvnw
|
||||||
./mvnw -B test
|
./mvnw -B test
|
||||||
|
|||||||
@@ -17,6 +17,20 @@ jobs:
|
|||||||
# tests rouges ne publiera donc PAS d'images.
|
# tests rouges ne publiera donc PAS d'images.
|
||||||
tests:
|
tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
# Base PostgreSQL réelle pour les tests Core (joignable par le nom `postgres`
|
||||||
|
# depuis le conteneur du job Gitea).
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:16-alpine
|
||||||
|
env:
|
||||||
|
POSTGRES_DB: loremind_test
|
||||||
|
POSTGRES_USER: loremind_test
|
||||||
|
POSTGRES_PASSWORD: loremind_test
|
||||||
|
options: >-
|
||||||
|
--health-cmd "pg_isready -U loremind_test -d loremind_test"
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 10
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -29,6 +43,10 @@ jobs:
|
|||||||
cache: maven
|
cache: maven
|
||||||
- name: Core — mvn test (+ JaCoCo check)
|
- name: Core — mvn test (+ JaCoCo check)
|
||||||
working-directory: core
|
working-directory: core
|
||||||
|
env:
|
||||||
|
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/loremind_test
|
||||||
|
SPRING_DATASOURCE_USERNAME: loremind_test
|
||||||
|
SPRING_DATASOURCE_PASSWORD: loremind_test
|
||||||
run: |
|
run: |
|
||||||
chmod +x ./mvnw
|
chmod +x ./mvnw
|
||||||
./mvnw -B test
|
./mvnw -B test
|
||||||
|
|||||||
20
.github/workflows/desktop-release.yml
vendored
20
.github/workflows/desktop-release.yml
vendored
@@ -42,6 +42,22 @@ jobs:
|
|||||||
# les memes tests ici. Un test rouge => pas d'installeur publie.
|
# les memes tests ici. Un test rouge => pas d'installeur publie.
|
||||||
tests:
|
tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
# Base PostgreSQL réelle pour les tests Core. Sur les runners GitHub (job sur
|
||||||
|
# la VM, pas en conteneur), le service est joignable via localhost + le port mappé.
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:16-alpine
|
||||||
|
env:
|
||||||
|
POSTGRES_DB: loremind_test
|
||||||
|
POSTGRES_USER: loremind_test
|
||||||
|
POSTGRES_PASSWORD: loremind_test
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
|
options: >-
|
||||||
|
--health-cmd "pg_isready -U loremind_test -d loremind_test"
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 10
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@@ -55,6 +71,10 @@ jobs:
|
|||||||
cache: maven
|
cache: maven
|
||||||
- name: Core — mvn test (+ JaCoCo check)
|
- name: Core — mvn test (+ JaCoCo check)
|
||||||
working-directory: core
|
working-directory: core
|
||||||
|
env:
|
||||||
|
SPRING_DATASOURCE_URL: jdbc:postgresql://localhost:5432/loremind_test
|
||||||
|
SPRING_DATASOURCE_USERNAME: loremind_test
|
||||||
|
SPRING_DATASOURCE_PASSWORD: loremind_test
|
||||||
run: |
|
run: |
|
||||||
chmod +x ./mvnw
|
chmod +x ./mvnw
|
||||||
./mvnw -B test
|
./mvnw -B test
|
||||||
|
|||||||
Reference in New Issue
Block a user