Skip to content

Test backwards compatibility #124

Test backwards compatibility

Test backwards compatibility #124

Workflow file for this run

name: Run automated tests
on:
workflow_dispatch:
push:
branches:
- main
- production
pull_request:
types: [ opened, synchronize, reopened ]
jobs:
# Tests with a database
zorm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache Docker images
uses: ScribeMD/[email protected]
with:
key: docker-cache
- run: >
docker compose
--project-directory .
--file github-actions/compose.yaml
run --rm --user root
zorm-test-github-actions
vallum:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: backward-compatibility-test
run: ./vallum/backward-compatibility-test.sh
env:
POSTGRES_URL: jdbc:postgresql://postgres:5432/postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
BASE_URL: http://localhost:8082
CORS_ALLOW_ORIGIN_PATTERN: 'http://localhost:\d{2,5}'
# Keycloak test realm JWK
ACCESS_TOKEN_JWK: |
{
"kid": "n-X5BeXFe6pIXhDBsDu2mQ2VYc23RSZCFRU5Y6IuzC8",
"kty": "OKP",
"alg": "EdDSA",
"use": "sig",
"crv": "Ed25519",
"x": "ILokSbk8EKH-Q1aWo_TguuDRccoSVfEbmGSbm5gcn5I"
}
USER_ID: f9eee559-7bd8-4a53-99cf-aaef36dad8a1
CLIENT_ID: test-client-ztor-api
CLIENT_SECRET: ${{ secrets.KEYCLOAK_TEST_CLIENT_SECRET }}
# Tests without a database
gradle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- run: gradle excel-read-named:test
- run: gradle zummon:jvmTest
frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 23
cache: npm
cache-dependency-path: ./frontend/package-lock.json
- run: npm install
working-directory: ./frontend
- run: npm run test
working-directory: ./frontend