This repository has been archived by the owner on Jun 12, 2024. It is now read-only.
Database for bank #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: Server | |
on: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'Server/**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: Server | |
services: | |
postgres: | |
image: postgres:16.1-alpine | |
env: | |
POSTGRES_USER: bank_user | |
POSTGRES_PASSWORD: bank_password | |
POSTGRES_DB: bank_db | |
SHOP_USER: shop_user | |
SHOP_PASSWORD: shop_password | |
SHOP_DB: shop_db | |
ports: | |
- '5432:5432' | |
# volumes: | |
# - '../../Server/init-shop-db.sh:/docker-entrypoint-initdb.d/init-shop-db.sh' | |
options: --health-cmd pg_isready --health-interval 5s --health-timeout 5s --health-retries 10 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Setup Java 17 with Maven | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'maven' | |
- name: Build with Maven | |
run: ./mvnw compile -q | |
- name: Run tests with Maven | |
run: ./mvnw test -q |