Skip to content

Migrate from mongodb to postgres #41

Migrate from mongodb to postgres

Migrate from mongodb to postgres #41

Workflow file for this run

name: CI
on:
pull_request:
workflow_dispatch:
jobs:
static-analysis:
runs-on: ubuntu-latest
permissions:
contents: read
services:
postgres:
image: postgres:17.0
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- env:
# use postgres for the host here because we have specified a container for the job.
# If we were running the job on the VM this would be localhost
DB_HOST: postgres
DB_PORT: ${{ job.services.postgres.ports[5432] }}
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'oracle'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@ec92e829475ac0c2315ea8f9eced72db85bb337a # v3.0.0
- name: Spotless check
run: ./gradlew spotlessCheck
- name: Run unit tests
run: ./gradlew check
- name: Build with Gradle Wrapper
run: ./gradlew assemble