Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/build_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
checkstyle:
name: Checkstyle
Expand All @@ -21,6 +25,7 @@ jobs:
with:
java-version: 21
distribution: 'temurin'
cache: gradle

- name: Checkstyle
run: |
Expand Down Expand Up @@ -56,6 +61,7 @@ jobs:
with:
java-version: 21
distribution: 'temurin'
cache: gradle

- name: Spotbugs
run: |
Expand Down Expand Up @@ -93,6 +99,7 @@ jobs:
with:
java-version: 21
distribution: 'temurin'
cache: gradle

- name: Execute Unit Tests
run: ./gradlew test jacocoTestReport --parallel --build-cache
Expand Down Expand Up @@ -128,6 +135,7 @@ jobs:
with:
java-version: 21
distribution: 'temurin'
cache: gradle

- name: Start Docker Dependencies
env:
Expand Down
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ The adaptor does not perform a PDS lookup/trace. You must perform the PDS lookup
* JDK 21
* Docker

## Directory Conventions

- Run service build/test commands from `service/`
- Run mock service build/test commands from `gpcc-mocks/`
- Run Docker helper scripts from `docker/`
- Use the repo Gradle Wrapper (`./gradlew` or `.\\gradlew.bat`) instead of a locally installed `gradle`.

## Configuration

The adaptor reads its configuration from environment variables. The following sections describe the environment variables
Expand Down Expand Up @@ -114,22 +121,22 @@ Edit `vars.local.sh` / `vars.public.sh` to add any missing values e.g. Spine cer

For local environment to run against mocks:
```bash
cd docker
./start-local-environment-mocks.sh
```

For local environment to run against GP Demonstrator 1.6.0:
```bash
cd docker
./start-local-environment-public.sh
```

You can also run the docker-compose commands directly.
You can also run the Docker Compose commands directly.

## How to Run Tests

**Warning**: Gradle uses a [Build Cache](https://docs.gradle.org/current/userguide/build_cache.html) to re-use compile and
test outputs for faster builds. To re-run passing tests without making any code changes you must first run
`./gradlew clean` to clear the build cache. Otherwise, gradle uses the cached outputs from a previous test execution to
pass the build.
Gradle can re-use previous task outputs. To force a full re-run of tests without changing source files, use
`--rerun-tasks` (or run `clean` before the test command).

You must run all Gradle commands from the `service/` directory.

Expand All @@ -147,7 +154,7 @@ tests and after making any changes to the mocks project. The JUnit tests use

```shell script
cd docker/
docker-compose build gpcc-mocks
docker compose build gpcc-mocks
```

Then run the integration tests from within the IDE or using Gradle:
Expand Down
16 changes: 6 additions & 10 deletions service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@ dependencies {
implementation "com.heroku.sdk:env-keystore:1.1.12"

implementation "org.apache.commons:commons-lang3:3.19.0"
implementation 'org.jetbrains:annotations:26.0.2'
implementation "org.jetbrains:annotations:26.0.2-1"
testImplementation "io.projectreactor:reactor-test"
implementation ("org.apache.commons:commons-lang3:3.19.0")
implementation 'org.jetbrains:annotations:26.0.2-1'
implementation 'com.github.spullara.mustache.java:compiler:0.9.14'

spotbugs 'com.github.spotbugs:spotbugs:4.9.8'
Expand Down Expand Up @@ -98,13 +96,11 @@ configurations {
}

tasks.register('integrationTest', Test) {
useJUnitPlatform() {
description = "Runs integration tests."
group = "verification"

testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
}
description = "Runs integration tests."
group = "verification"
useJUnitPlatform()
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
shouldRunAfter test
}

Expand Down
Loading