voyons voir #10
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI - Build backend | |
on: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- '**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:17.1 | |
env: | |
POSTGRES_USER: amigoscode | |
POSTGRES_PASSWORD: password | |
POSTGRES_DB: customer | |
ports: | |
- 5332:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'maven' | |
- name: Build and run Unit/Integration Tests with Maven, build docker image with jib and push to dockerhub | |
working-directory: . | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
run: mvn -ntp -B verify |