Skip to content

feat: Introduce native SSA support, generate applyconfigurations for CustomResources #7593

feat: Introduce native SSA support, generate applyconfigurations for CustomResources

feat: Introduce native SSA support, generate applyconfigurations for CustomResources #7593

name: Verify Unit Test Coverage
permissions: { }
on:
pull_request:
types: [ opened, synchronize, reopened, ready_for_review ]
env:
coverage_guard: ${{ github.workspace }}/scripts/coverage-metrics/bin/utils/unit-test-coverage/coverage_guard.py
pip_requirements: ${{ github.workspace }}/scripts/coverage-metrics/bin/utils/unit-test-coverage/requirements.txt
jobs:
assess-unit-test-coverage:
runs-on: ubuntu-latest
steps:
- name: Check out reporting tools
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: kyma-project/qa-toolkit
path: scripts
- name: Adjust the reporting tools
run: |
chmod a+x $coverage_guard
python -m pip install --upgrade pip
pip install -r $pip_requirements
- name: Check out the sourcecode
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
path: codebase
- name: Set up Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version-file: ${{ github.workspace }}/codebase/go.mod
- name: Run the quality gate verification
run: |
repo_paths=(
"${{ github.workspace }}/codebase"
"${{ github.workspace }}/codebase/api"
"${{ github.workspace }}/codebase/maintenancewindows"
)
modules=(
"github.com/kyma-project/lifecycle-manager"
"github.com/kyma-project/lifecycle-manager/api"
"github.com/kyma-project/lifecycle-manager/maintenancewindows"
)
configs=(
"${{ github.workspace }}/codebase/unit-test-coverage-lifecycle-manager.yaml"
"${{ github.workspace }}/codebase/unit-test-coverage-api.yaml"
"${{ github.workspace }}/codebase/unit-test-coverage-maintenancewindows.yaml"
)
for i in "${!modules[@]}"; do
repo_path="${repo_paths[$i]}"
module="${modules[$i]}"
config="${configs[$i]}"
echo "Running coverage_guard for module: $module using config: $config"
$coverage_guard --repo "$repo_path" --module "$module" --config "$config"
done