Skip to content

Try to add DB to CI

Try to add DB to CI #6

Workflow file for this run

# This workflow will build a Java project with Gradle 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-gradle
name: Java CI with Gradle & Oracle DB
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Build with Gradle
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
with:
arguments: build --info
env:
SPRING_DATASOURCE_USERNAME: app_user
SPRING_DATASOURCE_PASSWORD: "TestPassword123()"
SPRING_DATASOURCE_JDBCURL: jdbc:oracle:thin:@localhost:1521/dev
SPRING_QUARTZ_JDBC_INITIALIZESCHEMA: always
services:
# Oracle service (label used to access the service container)
oracle:
# Docker Hub image (feel free to change the tag "latest" to any other available one)
image: gvenzl/oracle-free:23.3-slim-faststart
# Provide passwords and other environment variables to container
env:
ORACLE_RANDOM_PASSWORD: true
APP_USER: app_user
APP_USER_PASSWORD: "TestPassword123()"
ORACLE_DATABASE: dev
# Forward Oracle port
ports:
- 1521:1521
# Provide healthcheck script options for startup
options: >-
--health-cmd healthcheck.sh
--health-interval 10s
--health-timeout 5s
--health-retries 10