-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (37 loc) · 976 Bytes
/
backend-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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