Skip to content

Commit

Permalink
Merge branch 'refs/heads/master' into feature/messaging
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/main/scala/com/campudus/tableaux/Starter.scala
#	src/main/scala/com/campudus/tableaux/controller/TableauxController.scala
#	src/test/scala/com/campudus/tableaux/testtools/TableauxTestBase.scala
  • Loading branch information
Jaroslav Bobrowski committed Nov 11, 2024
2 parents 01d3e22 + f7cd6db commit 2ef86c5
Show file tree
Hide file tree
Showing 93 changed files with 7,106 additions and 2,406 deletions.
1 change: 0 additions & 1 deletion .coveralls.yml

This file was deleted.

12 changes: 10 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# ignore all files and folders for Docker build context ...
**

# ...except binaries from gradle build
!build/libs/*
# except the following files and folders
!src
!build.gradle
!gradle.properties
!settings.gradle

# files for testing
!role-permissions-test.json
!conf-jenkins.json
!conf-example.json
41 changes: 25 additions & 16 deletions .github/workflows/branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ name: CI | Push on branches
on:
push:
branches:
- "*"
- "**"
- "!master"

env:
Expand All @@ -25,13 +25,14 @@ jobs:

services:
postgres:
image: postgres:12
image: postgres:16
ports:
- 5432:5432
env:
POSTGRES_DB: ${{ env.POSTGRES_DB }}
POSTGRES_USER: ${{ env.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
POSTGRES_HOST_AUTH_METHOD: trust
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
Expand All @@ -40,12 +41,14 @@ jobs:
--health-retries 5
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: "11"
distribution: 'temurin'
java-version: '11'
cache: 'gradle'

- name: Setup Test ENV
run: mv conf-github-ci.json conf-test.json
Expand All @@ -67,24 +70,24 @@ jobs:

- name: Archive test report
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Test Report
name: test-report
path: build/reports/tests/test

- name: Archive test result (xml)
- name: Archive test results (xml)
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Unit Test Results
name: test-results
path: build/test-results/test/TEST-*.xml

- name: Archive code coverage results
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Coverage Report
path: output/test/code-coverage.html
name: coverage-report
path: build/reports/scoverage

- name: Test Report
uses: dorny/test-reporter@v1
Expand All @@ -98,6 +101,12 @@ jobs:
fail-on-error: "true"
max-annotations: "10"

- name: Coverage Report
uses: 5monkeys/cobertura-action@master
with:
path: build/reports/scoverage/cobertura.xml
minimum_coverage: 80

publish-test-results:
name: "Publish Unit Tests Results"
needs: build-and-test
Expand All @@ -106,11 +115,11 @@ jobs:

steps:
- name: Download Artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
path: artifacts

- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: artifacts/**/*.xml
files: artifacts/test-results/**/*.xml
39 changes: 24 additions & 15 deletions .github/workflows/main_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
postgres-version: [9.6, 10, 11, 12]
postgres-version: [13, 14, 15, 16]
max-parallel: 4
fail-fast: false

Expand All @@ -36,6 +36,7 @@ jobs:
POSTGRES_DB: ${{ env.POSTGRES_DB }}
POSTGRES_USER: ${{ env.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
POSTGRES_HOST_AUTH_METHOD: trust
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
Expand All @@ -44,12 +45,14 @@ jobs:
--health-retries 5
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: "11"
distribution: 'temurin'
java-version: '11'
cache: 'gradle'

- name: Setup Test ENV
run: mv conf-github-ci.json conf-test.json
Expand All @@ -71,24 +74,24 @@ jobs:

- name: Archive test report
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Test Report
name: test-report
path: build/reports/tests/test

- name: Archive test result (xml)
- name: Archive test results (xml)
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Unit Test Results
name: test-results
path: build/test-results/test/TEST-*.xml

- name: Archive code coverage results
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Coverage Report
path: output/test/code-coverage.html
name: coverage-report
path: build/reports/scoverage

- name: Test Report
uses: dorny/test-reporter@v1
Expand All @@ -102,6 +105,12 @@ jobs:
fail-on-error: "true"
max-annotations: "10"

- name: Coverage Report
uses: 5monkeys/cobertura-action@master
with:
path: build/reports/scoverage/cobertura.xml
minimum_coverage: 80

publish-test-results:
name: "Publish Unit Tests Results"
needs: build-and-test
Expand All @@ -110,11 +119,11 @@ jobs:

steps:
- name: Download Artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
path: artifacts

- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: artifacts/**/*.xml
files: artifacts/test-results/**/*.xml
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Tableaux specific
conf.json
conf-*.jsonc
conf-*.json
!conf-example.json
!conf-example-manual-auth.json
!conf-test-example.json
!conf-github-ci.json
!conf-jenkins.json
uploads/
.vertx/
uploads*
Expand All @@ -12,6 +15,7 @@ classes/
bin/
out/
**.DS_Store
role-*.jsonc
role-*.json
!role-permissions-example.json
!role-permissions-test.json
Expand Down Expand Up @@ -57,3 +61,5 @@ project/plugins/project/

# local log properties
local_logging.properties

*.local*
27 changes: 24 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
FROM openjdk:11.0.16-jre-slim
# to use APP_HOME in other stages, we need to redeclare it in each stage (not on docker for mac)
ARG APP_HOME=/usr/src/app

WORKDIR /usr/src/app
FROM gradle:7.4.1-jdk17 as cacher
ARG APP_HOME
ENV GRADLE_USER_HOME /cache
WORKDIR $APP_HOME
COPY build.gradle gradle.properties settings.gradle ./
# prevent errors from spotless b/c in cacher stage we have no source files yet
RUN gradle testClasses assemble -x spotlessScala

COPY ./build/libs/grud-backend-0.1.0-fat.jar ./tableaux-fat.jar
FROM cacher as builder
ARG APP_HOME
ENV GRADLE_USER_HOME /cache
WORKDIR $APP_HOME
COPY --from=cacher /cache /cache
# prevent from strange docker error when built without buildkit, see: https://github.com/moby/moby/issues/37965
RUN true
COPY --chown=gradle:gradle . $APP_HOME
RUN gradle -v \
&& gradle testClasses assemble \
&& mv conf-jenkins.json conf-test.json

FROM openjdk:21-slim as prod
ARG APP_HOME
WORKDIR $APP_HOME
COPY --from=builder $APP_HOME/build/libs/grud-backend-0.1.0-fat.jar ./tableaux-fat.jar
CMD [ "java", "-Xmx512M", "-jar", "./tableaux-fat.jar", "-conf /config.json" ]
4 changes: 2 additions & 2 deletions GETTING_STARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- [Retrieving a specific column](#retrieving-a-specific-column)
- [Retrieving a specific row](#retrieving-a-specific-row)
- [Retrieving a specific cell](#retrieving-a-specific-cell)
- [2.2. Data types & column kinds](#22-data-types--column-kinds)
- [2.2. Data types \& column kinds](#22-data-types--column-kinds)
- [Primitive data types](#primitive-data-types)
- [Examples](#examples)
- [Complex data types](#complex-data-types)
Expand Down Expand Up @@ -155,7 +155,7 @@ Call this endpoint to retrieve all rows of a specific table. Most important part
"page": { // result can be paged with two query parameters offset and limit
"offset": null,
"limit": null,
"totalSize": 18 // total size of this table
"totalSize": 18 // total number of rows depending on filter query parameters. If no filters are set, totalSize is the total number of rows in the table
},
"rows": [
{ // row object
Expand Down
Loading

0 comments on commit 2ef86c5

Please sign in to comment.