Fix operator tests flakiness in CI #3269
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Operator tests Workflow | |
on: | |
push: | |
paths-ignore: | |
- '.gitignore' | |
- 'LICENSE' | |
- 'README*' | |
- 'docs/**' | |
- '.github/workflows/**' | |
branches: [ main ] | |
pull_request: | |
paths-ignore: | |
- '.gitignore' | |
- 'LICENSE' | |
- 'README*' | |
- 'docs/**' | |
branches: [ main ] | |
concurrency: | |
# Only run once for latest commit per ref and cancel other (previous) runs. | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
tests: | |
name: Operator Basic tests | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Enable port-forwarding | |
run: | | |
sudo apt-get -y install socat | |
- name: Setup Minikube-Kubernetes | |
uses: manusa/[email protected] | |
with: | |
minikube version: v1.28.0 | |
kubernetes version: v1.25.0 | |
github token: ${{ secrets.GITHUB_TOKEN }} | |
start args: '--force' | |
- name: Enable minikube ingress | |
run: | | |
minikube addons enable ingress | |
- name: Setup minikube tunnel | |
run: | | |
minikube tunnel & | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: 'maven' | |
- name: Workaround jackson-coreutils | |
run: | | |
# upstream issue: https://github.com/java-json-tools/jackson-coreutils/issues/59 | |
rm -rf ~/.m2/repository/com/github/java-json-tools | |
mkdir -p /tmp/coreutils-workaround | |
( cd /tmp/coreutils-workaround && mvn dependency:get -DremoteRepositories=https://repo1.maven.org/maven2 -Dartifact=com.github.java-json-tools:jackson-coreutils:2.0 ) | |
- name: Run the tests in local mode | |
run: ./mvnw clean verify -P '!external_repos' -DskipOperatorTests=false -pl operator/controller -am | |
- name: Run the tests in remote mode | |
run: | | |
./mvnw clean package -P '!external_repos' -pl operator/controller -am -Dquarkus.container-image.build=true | |
./mvnw clean verify -P '!external_repos' -DskipOperatorTests=false -pl operator/controller -am -Dtest.operator.deployment=remote -Dtest.operator.deployment-target=minikube |