⬆ upgrade dependency io.ktor:ktor-bom to v3.0.3 #548
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: Http4k Backend Tests | |
on: | |
push: | |
branches: | |
- main | |
- master | |
- 'renovate/**' | |
paths: | |
- 'conduit-backend/**' | |
- 'build-src/**' | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
DB_NAME: test-db | |
DB_USER: test-user | |
DB_PASSWORD: test-password | |
services: | |
postgres: | |
image: postgres:alpine | |
env: | |
POSTGRES_DB: ${{ env.DB_NAME }} | |
POSTGRES_USER: ${{ env.DB_USER }} | |
POSTGRES_PASSWORD: ${{ env.DB_PASSWORD }} | |
options: >- | |
--health-cmd "pg_isready -U test-user -d test-db" | |
--health-interval 3s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
redis: | |
image: redis:alpine | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 3s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 6379:6379 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
- name: Run Database Migrations | |
uses: docker://flyway/flyway:latest-alpine | |
env: | |
FLYWAY_URL: jdbc:postgresql://postgres:5432/${{ env.DB_NAME }} | |
FLYWAY_USER: ${{ env.DB_USER }} | |
FLYWAY_PASSWORD: ${{ env.DB_PASSWORD }} | |
FLYWAY_LOCATIONS: filesystem:/github/workspace/conduit-backend/db-migration/main,filesystem:/github/workspace/conduit-backend/db-migration/test | |
# Set container's JAVA_HOME to prevent GitHub Actions from passing its own Java path | |
# This ensures the container uses its internal Java installation at /opt/java/openjdk | |
JAVA_HOME: /opt/java/openjdk | |
with: | |
args: migrate | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Run Backend Tests | |
working-directory: conduit-backend | |
env: | |
DB__URL: jdbc:postgresql://localhost:5432/${{ env.DB_NAME }} | |
DB__USER: ${{ env.DB_USER }} | |
DB__PASSWORD: ${{ env.DB_PASSWORD }} | |
run: | | |
./gradlew check | |
- name: Upload build reports | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: backend-build-reports | |
path: conduit-backend/build/reports/ |