Skip to content

FIx KAAP Issues

FIx KAAP Issues #651

Workflow file for this run

name: CI - Build and tests
on:
pull_request:
branches:
- main
jobs:
build-and-unit-test:
name: Build and test
runs-on: ubuntu-20.04
timeout-minutes: 60
steps:
- name: checkout
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
- name: Check license headers
run: mvn license:check
- name: Build
run: mvn -B -T 1C -ntp -nsu install -DskipTests
- name: Check CRDs and doc up-to-date
run: |
#!/bin/bash
./src/generate-crds-docs.sh
if [[ `git status --porcelain` ]]; then
echo "Found files changed after building, please run ./src/generate-crds-docs.sh and commit the changes"
git status
git diff
exit 1
fi
- name: Unit tests
run: mvn -B -ntp -nsu test -pl '!tests'
integration-tests:
name: Integration tests - ${{ matrix.name }}
runs-on: ubuntu-20.04
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- name: Scaling
group: scaling
num_agents: 0
- name: Scaling (BookKeeper)
group: bk-scaling
num_agents: 0
- name: Misc
group: misc
num_agents: 0
- name: Helm
group: helm
num_agents: 0
setup_helm: "true"
- name: Helm (TLS)
group: helm-tls
num_agents: 0
setup_helm: "true"
- name: Helm (TLS) Pulsar 3
group: helm-tls-pulsar3
num_agents: 0
setup_helm: "true"
- name: Helm Kafka (TLS)
group: helm-tls-kafka
num_agents: 0
setup_helm: "true"
- name: Helm BK racks (TLS)
group: helm-tls-bkracks
num_agents: 0
setup_helm: "true"
# - name: Multi nodes
# group: multi-nodes
# num_agents: 1
steps:
- name: checkout
uses: actions/checkout@v3
- uses: azure/setup-helm@v3
with:
version: latest
token: ${{ secrets.GITHUB_TOKEN }}
if: ${{ matrix.setup_helm == 'true' }}
- name: Build Helm charts
run: |
set -e
add_repos() {
chart=$1
cat $chart/Chart.yaml | grep "repository:" | grep -e "https://" -e "http://" | awk '{print $2}' | awk -F'/' '{print $NF} {print $0}' | xargs -n2 helm repo add
}
add_repos helm/kaap-stack
helm dependency build helm/kaap
helm dependency build helm/kaap-stack
if: ${{ matrix.setup_helm == 'true' }}
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
- name: Setup ssh access to build runner VM
if: ${{ github.event_name == 'pull_request' }}
uses: apache/pulsar/.github/actions/ssh-access@master
continue-on-error: true
with:
limit-access-to-actor: true
- name: Build
run: mvn -B -T 1C -ntp -nsu clean install -DskipTests -pl tests -am -Dcheckstyle.skip -Dspotbugs.skip -Pskip-crds
- name: Integration tests
run: |
#!/bin/bash
mvn -B -ntp -nsu test -pl tests \
-Dgroups='${{ matrix.group }}' \
-Dkaap.tests.env.existing.k3s.agents='${{ matrix.num_agents }}'
- name: Upload Surefire reports
uses: actions/upload-artifact@v3
if: failure()
continue-on-error: true
with:
name: test-logs-${{ matrix.group }}
path: "**/target/operator-test-logs/*"
retention-days: 7