diff --git a/.github/workflows/ktlint.yaml b/.github/workflows/ktlint.yaml deleted file mode 100644 index c825ef30..00000000 --- a/.github/workflows/ktlint.yaml +++ /dev/null @@ -1,32 +0,0 @@ -name: Ktlint Check - -on: - push: - branches: - - "**" - -jobs: - ktlint: - name: Run ktlint check - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up JDK 21 - uses: actions/setup-java@v4 - with: - java-version: '21' - distribution: 'temurin' - - - - name: Cache Gradle dependencies - uses: actions/cache@v3 - with: - path: ~/.gradle/caches - key: gradle-${{ runner.os }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} - restore-keys: | - gradle-${{ runner.os }}- - - - name: Run ktlintCheck with Gradle - run: ./gradlew ktlintCheck diff --git a/.github/workflows/persistence-ci.yaml b/.github/workflows/persistence-ci.yaml index c6d09d9b..a6b7a334 100644 --- a/.github/workflows/persistence-ci.yaml +++ b/.github/workflows/persistence-ci.yaml @@ -22,33 +22,21 @@ jobs: name: Build jactor-persistence steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: actions/setup-java@v4 - with: distribution: temurin java-version: 25 - name: Cache Gradle dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.gradle/caches key: gradle-${{ runner.os }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} restore-keys: | gradle-${{ runner.os }}- + - run: ./gradlew :persistence:ktlintCheck - run: ./gradlew :persistence:build --scan -x test - - name: Verify dependencies - run: | - COUNT=$(./gradlew -q :persistence:dependencies | grep -c SNAPSHOT || true) - - echo "Found $COUNT SNAPSHOT dependencies" - - if [ "$COUNT" -gt 0 ] - then - >&2 echo ::error No SNAPSHOT dependencies allowed - ./gradlew -q :persistence:dependencies - exit 1; - fi - name: Run tests with stack trace information run: ./gradlew :persistence:test --tests "*" --stacktrace --info diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index bcf30965..a9a5334b 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} - uses: actions/setup-java@v4 @@ -19,7 +19,7 @@ jobs: java-version: 25 - name: Cache Gradle dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.gradle/caches key: gradle-${{ runner.os }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} @@ -27,3 +27,27 @@ jobs: gradle-${{ runner.os }}- - run: ./gradlew assemble + - name: Verify persistence dependencies + run: | + COUNT=$(./gradlew -q :persistence:dependencies | grep -c SNAPSHOT || true) + + echo "Found $COUNT SNAPSHOT dependencies" + + if [ "$COUNT" -gt 0 ] + then + >&2 echo ::error No SNAPSHOT dependencies allowed + ./gradlew -q :persistence:dependencies + exit 1; + fi + - name: Verify web dependencies + run: | + COUNT=$(./gradlew -q :web:dependencies | grep -c SNAPSHOT || true) + + echo "Found $COUNT SNAPSHOT dependencies" + + if [ "$COUNT" -gt 0 ] + then + >&2 echo ::error No SNAPSHOT dependencies allowed + ./gradlew -q :web:dependencies + exit 1; + fi diff --git a/.github/workflows/tag-persistence.yaml b/.github/workflows/tag-persistence.yaml index 444a431d..c25dd7d1 100644 --- a/.github/workflows/tag-persistence.yaml +++ b/.github/workflows/tag-persistence.yaml @@ -7,7 +7,6 @@ on: - '.github/**' - 'persistence/**' - 'shared/**' - - 'buildSrc/**' - 'gradle/**' jobs: diff --git a/.github/workflows/tag-web.yaml b/.github/workflows/tag-web.yaml index d112679c..319f597e 100644 --- a/.github/workflows/tag-web.yaml +++ b/.github/workflows/tag-web.yaml @@ -7,7 +7,6 @@ on: - '.github/**' - 'web/**' - 'shared/**' - - 'buildSrc/**' - 'gradle/**' jobs: diff --git a/.github/workflows/web-ci.yaml b/.github/workflows/web-ci.yaml index d5a271a2..5c90bc72 100644 --- a/.github/workflows/web-ci.yaml +++ b/.github/workflows/web-ci.yaml @@ -19,32 +19,20 @@ jobs: name: Build and test with gradle steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: actions/setup-java@v4 - with: distribution: temurin java-version: 25 - name: Cache Gradle dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.gradle/caches key: gradle-${{ runner.os }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} restore-keys: | gradle-${{ runner.os }}- + - run: ./gradlew :persistence:ktlintCheck - run: ./gradlew :web:build --scan -x test - - name: Verify dependencies - run: | - COUNT=$(./gradlew -q :web:dependencies | grep -c SNAPSHOT || true) - - echo "Found $COUNT SNAPSHOT dependencies" - - if [ "$COUNT" -gt 0 ] - then - >&2 echo ::error No SNAPSHOT dependencies allowed - ./gradlew -q :web:dependencies - exit 1; - fi - run: ./gradlew :web:test --tests "*" --stacktrace diff --git a/persistence/README.md b/persistence/README.md index 0216f5db..1cfa4026 100644 --- a/persistence/README.md +++ b/persistence/README.md @@ -9,19 +9,17 @@ The main purpose is to learn about programming microservices using Kotlin, (with to get a deeper understanding of continuous integration/DevOps using GitHub workflow/actions and gradle. integration testing with cucumber. -This project is a microservice dealing with persistence to a database using JPA (java persistence api) via -spring-data-jpa and is a microservice to use under `com.github.jactor.percistence` (formerly as part of the archived -project [jactor-rises](https://github.com/jactor-rises/jactor-rises)) +This project is a microservice dealing with persistence to a database using jetbrains exposed (formerly as part of the +archived project [jactor-rises](https://github.com/jactor-rises/jactor-rises)) ### Set up * a spring-boot 3 application * build with [gradle](https://gradle.org). * is using [h2](http://h2database.com) (in-memory database) - * run it with spring-boot, or as any other java-application -* this application is documented with swagger. After startup, use link: - * ( - swagger ui) + * run it with spring-boot +* this application is documented with swagger. After startup, use link + [swagger ui](http://localhost:1099/jactor-persistence/swagger-ui/index.html?configUrl=/jactor-persistence/v3/api-docs/swagger-config#/) ### Build @@ -68,7 +66,7 @@ java -jar build/lib/jactor-persistence--SNAPSHOT.jar * [flyway](https://flywaydb.org) * [github actions](https://docs.github.com/en/actions/learn-github-actions) -* [gradle](https://gradle.org) (8.x) +* [gradle](https://gradle.org) (9.x) * [swagger-ui](https://swagger.io/tools/swagger-ui/) * herunder [springdoc](https://springdoc.org) * [sdk man](https://sdkman.io) diff --git a/web/README.md b/web/README.md index 81accc22..044f8722 100644 --- a/web/README.md +++ b/web/README.md @@ -32,7 +32,7 @@ not a front-end programmer and this module is only present for interactive use o ### Some technologies used on jactor-web -* [spring-boot 3.4.x](https://spring.io/projects/spring-boot) +* [spring-boot 3.5.x](https://spring.io/projects/spring-boot) * [kotlin 2.x](https://kotlinlang.org) * [junit 5](https://junit.org/junit5/) * [assertk](https://github.com/willowtreeapps/assertk)