SD/fix/#30 Removing application.yml within test folder as has incorre… #28
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: | |
push: | |
branches: [ "main" ] | |
paths: | |
- online-book-store/** | |
pull_request: | |
branches: [ "main" ] | |
paths: | |
- online-book-store/** | |
env: | |
JAVA_VERSION: 17 | |
JAVA_DISTRO: temurin | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:14.5 | |
env: | |
POSTGRES_USER: admin | |
POSTGRES_PASSWORD: 1234 | |
POSTGRES_DB: admin-unit-test | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
defaults: | |
run: | |
working-directory: ./online-book-store | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v3 | |
- name: Set up JDK ${{env.JAVA_VERSION}} | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{env.JAVA_VERSION}} | |
distribution: ${{env.JAVA_DISTRO}} | |
cache: maven | |
- name: Build and run only Unit Tests with Maven | |
run: mvn -ntp -B clean package |