Skip to content

Merge pull request #3 from bkuberek/filter-active-reservations #30

Merge pull request #3 from bkuberek/filter-active-reservations

Merge pull request #3 from bkuberek/filter-active-reservations #30

Workflow file for this run

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Java CI with Maven
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
# Label of the container job
build:
# Containers must run in Linux based operating systems
runs-on: ubuntu-latest
# Service containers to run with `container-job`
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres:16
# Provide the password for postgres
env:
POSTGRES_USER: bookings
POSTGRES_PASSWORD: bookings
POSTGRES_DB: bookings
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 54321:5432
permissions:
checks: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven
env:
POSTGRES_HOST: localhost
POSTGRES_PORT: 54321
POSTGRES_USERNAME: bookings
POSTGRES_PASSWORD: bookings
TRANSLATE_API_BASIC_AUTH: Basic
run: ./mvnw package
- name: Publish Test Report
if: success() || failure()
uses: scacap/action-surefire-report@v1
# # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
# - name: Update dependency graph
# uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6