diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index 1e357cf2..6b2a2b5d 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -4,29 +4,29 @@ description: Runs Unit and Integration Test. Tests will be executed on a Databro inputs: upload-test-reports: description: "Uploads the resulting test reports if enabled" - required: false default: 'false' upload-code-coverage-reports: description: "Executes Code Coverage Generation and uploads the resulting reports if enabled" - required: false default: 'false' databroker-version: description: "Databroker Version" - required: false default: 'master' + kotest-tag: + description: > + The Kotest Tag to use when executing the tests. Check Tag.kt for valid options. Different Tags might require the + Databroker to be started in a different mode. Currently only unsecured mode (no tls, no authentication) is + supported. + default: '!CustomDatabroker' runs: using: "composite" steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: "Run Docker Container of Databroker in detached mode" run: docker run --pull=always --rm --publish 55556:55556/tcp --detach --name databroker ghcr.io/eclipse/kuksa.val/databroker:${{ inputs.databroker-version }} --port 55556 --insecure shell: bash - name: Run 'test' with Gradle Wrapper - run: ./gradlew test -Dkotest.tags="!CustomDatabroker" + run: ./gradlew test -Dkotest.tags="${{ inputs.kotest-tag}}" shell: bash - name: Upload Test Reports diff --git a/.github/workflows/daily_integration_main-master.yaml b/.github/workflows/daily_integration_main-master.yaml new file mode 100644 index 00000000..e2edaf51 --- /dev/null +++ b/.github/workflows/daily_integration_main-master.yaml @@ -0,0 +1,24 @@ +name: SDK:main <-> Databroker:master + +on: + schedule: + - cron: "0 0 * * *" + +jobs: + integration-tests: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: main + + - name: Setup Project + uses: ./.github/actions/setup-project + + - name: Run Tests + uses: ./.github/actions/run-tests + with: + upload-test-reports: true + databroker-version: master + kotest-tag: "Integration & DefaultDatabroker" diff --git a/README.md b/README.md index 0fc3e670..b559da66 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,12 @@ # kuksa-sdk-android -This is an Android SDK for the [KUKSA Vehicle Abstraction Layer](https://github.com/eclipse/kuksa.val). - - [![License](https://img.shields.io/badge/License-Apache%202.0-green.svg)](https://opensource.org/licenses/Apache-2.0) [![Gitter](https://img.shields.io/gitter/room/kuksa-val/community)](https://gitter.im/kuksa-val/community) +![SDK:main <-> Databroker:master](https://github.com/eclipse-kuksa/kuksa-android-sdk/actions/workflows/daily_integration_main-master.yaml/badge.svg) + +This is an Android SDK for the [KUKSA Vehicle Abstraction Layer](https://github.com/eclipse/kuksa.val). + ## Overview The KUKSA Android SDK allows you to interact with [VSS data](https://covesa.github.io/vehicle_signal_specification/) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 822a32a1..c8d4ad0f 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -76,3 +76,38 @@ Used for detecting static code quality issues. It is recommended to install the #### [ktlint](https://pinterest.github.io/ktlint) Used for detecting static code style issues. + +### Fail-Early-Builds + +We have multiple Fail-Early-Builds which run different versions of the KUKSA Android SDK against the KUKSA Databroker. +Our goal is to have an early indication which allows us more easily to find breaking or behavioral changes when running our SDK on a specific version of the Databroker. + +When one of these builds fail a short validity check should be done: +- Were the correct versions of the SDK and Databroker used? +- Is it a sporadically failing test? Does a re-run fixes it? +- Is apparent if the issue is inside the SDK (e.g. wrongly written test, bug) or inside the Databroker (e.g. behavioral change, bug)? + +Using different versions of the SDK and Databroker give different indications with varying importance. See the following list: + +**SDK:latestRelease -> Databroker:latestRelease** +This means that issues exist between the latest released version of the SDK and the latest released version of the Databroker. + +If this build fails it should be considered as a potential bigger issue +=> A hotfix or new release needs to be done + +**SDK:latestRelease -> Databroker:master** +This means, that the latest released version of the SDK is not compatible with the currently developed version of the Databroker. + +If this build fails it should be considered as a warning +=> Required fixes should be part of the next SDK release + +**SDK:main -> Databroker:master** + +![SDK:main <-> Databroker:master](https://github.com/eclipse-kuksa/kuksa-android-sdk/actions/workflows/daily_integration_main-master.yaml/badge.svg) + +This means both the SDK and Databroker are running in a kind of "bleeding edge" state in their currently developed version. + +If this build fails, it should be considered as a warning. +=> It is okay for the pipeline to fail for a short period of time. Longer periods should be avoided. +=> No explicit release / hotfix required, both components should be compatible before a release +