Skip to content

Run Integration Tests on GitHub Actions #92

Run Integration Tests on GitHub Actions

Run Integration Tests on GitHub Actions #92

Workflow file for this run

name: build
on:
pull_request
jobs:
build-project:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- 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:master --port 55556 --insecure
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Run 'assemble' with Gradle Wrapper
run: ./gradlew assemble
- name: Run 'lint' with Gradle Wrapper
run: ./gradlew ktlintCheck detekt
- name: Upload Detekt Reports
uses: actions/upload-artifact@v3
with:
name: detekt-reports
path: ${{ github.workspace }}/build/reports/detekt
if-no-files-found: error
retention-days: 14
- name: Run 'test' with Gradle Wrapper
run: ./gradlew test -Dkotest.tags="!Secure"
- name: Upload Test Reports
uses: actions/upload-artifact@v3
with:
name: test-reports
path: ${{ github.workspace }}/**/reports/tests/*/
if-no-files-found: error
retention-days: 14
- name: "Stop Docker Container of Databroker"
if: always()
run: docker stop databroker