Skip to content

CI IT

CI IT #291

Workflow file for this run

name: CI IT
on:
workflow_dispatch:
schedule:
- cron: '0 5 * * 1,3,5'
jobs:
prepare:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: 'Load Matrix'
id: matrix
shell: bash
run: |
MATRIX=$(jq -c . .github/workflows/k8s-versions.json)
echo "MATRIX=$MATRIX" >> $GITHUB_OUTPUT
outputs:
matrix: ${{ steps.matrix.outputs.MATRIX }}
k8s-it:
runs-on: ubuntu-latest
needs: [ prepare ]
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.prepare.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2it-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2-
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'liberica'
- name: 'Install minikube ${{ matrix.patch && matrix.patch || matrix.k8s_version }}'
shell: bash
run: |
MINIKUBE_VERSION="v1.34.0"
curl -LO "https://storage.googleapis.com/minikube/releases/$MINIKUBE_VERSION/minikube-linux-amd64"
sudo install minikube-linux-amd64 /usr/local/bin/minikube
minikube start "--kubernetes-version=${{ matrix.patch && matrix.patch || matrix.k8s_version }}"
# build
- name: Build
run: |
./mvnw -B -Pfailsafe verify -pl spring-cloud-deployer-kubernetes
- name: Test Report
uses: dorny/test-reporter@v1
if: ${{ success() || failure() }}
with:
name: "Integration Test - Report for ${{ matrix.k8s_version }}"
path: '**/failsafe-reports/*IT.xml'
reporter: java-junit
list-tests: 'failed'
# clean m2 cache
- name: Clean cache
run: |
find ~/.m2/repository -type d -name '*SNAPSHOT' | xargs rm -fr