| # Licensed to the Apache Software Foundation (ASF) under one or more | |
| # contributor license agreements. See the NOTICE file distributed with | |
| # this work for additional information regarding copyright ownership. | |
| # The ASF licenses this file to You under the Apache License, Version 2.0 | |
| # (the "License"); you may not use this file except in compliance with | |
| # the License. You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| name: run-java-client-e2e-tests | |
| on: | |
| pull_request: | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7.0.1 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 | |
| - name: Cache Docker layers | |
| uses: actions/cache@v6.1.0 | |
| with: | |
| path: /tmp/.buildx-cache | |
| key: ${{ runner.os }}-buildx-${{ github.sha }} | |
| restore-keys: | | |
| ${{ runner.os }}-buildx- | |
| - name: Set up JDK 25 | |
| uses: actions/setup-java@v6.1.0 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '25' | |
| cache: 'maven' | |
| - name: Build with Maven | |
| run: mvn clean install | |
| env: | |
| DEVELOCITY_ACCESS_KEY: ${{ secrets.STREAMPIPES_DEVELOCITY_ACCESS_KEY }} | |
| - name: Build Docker images | |
| run: | | |
| docker build -t streampipes_pipeline-elements-all-jvm:release-validation ./streampipes-extensions/streampipes-extensions-all-jvm | |
| docker build -t streampipes_backend:release-validation ./streampipes-service-core | |
| - name: Generate service credential for client tests | |
| run: echo "SP_SERVICE_SECRET=$(openssl rand -hex 32)" >> "$GITHUB_ENV" | |
| - name: Run Java client single-instance test | |
| run: | | |
| docker compose -f ./streampipes-client-e2e/docker-compose.yml -p streampipes-client-e2e-single up -d | |
| cd ./streampipes-client-e2e/tool | |
| chmod +x ./start-streampipes-client-e2e.sh | |
| chmod +x ./java-client-e2e.sh | |
| chmod +x ./install-element.sh | |
| ./start-streampipes-client-e2e.sh -t java-client-e2e.sh -s single | |
| - name: Stop StreamPipes (single) | |
| if: always() | |
| run: docker compose -f ./streampipes-client-e2e/docker-compose.yml -p streampipes-client-e2e-single down -v | |
| - name: Run Java client load balancer test | |
| run: | | |
| docker compose -f ./streampipes-client-e2e/docker-compose-loadbalance.yml -p streampipes-client-e2e-lb up -d | |
| cd ./streampipes-client-e2e/tool | |
| chmod +x ./start-streampipes-client-e2e.sh | |
| chmod +x ./java-client-e2e.sh | |
| chmod +x ./install-element.sh | |
| ./start-streampipes-client-e2e.sh -t java-client-e2e.sh -s lb | |
| - name: Stop StreamPipes (load balancer) | |
| if: always() | |
| run: docker compose -f ./streampipes-client-e2e/docker-compose-loadbalance.yml -p streampipes-client-e2e-lb down -v |