Update module github.com/gardener/gardener/pkg/apis to v1.145.0 #9810
This file contains hidden or 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: tests | |
| on: | |
| workflow_call: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - .reuse | |
| - LICENSES/ | |
| - LICENSE | |
| - .gitignore | |
| - "**.md" | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| paths-ignore: | |
| - .reuse | |
| - LICENSES/ | |
| - LICENSE | |
| - .gitignore | |
| - "**.md" | |
| env: | |
| GITHUB_BASELINE_WORKFLOW_REF: "tests" | |
| permissions: | |
| contents: read | |
| jobs: | |
| # lint: | |
| ############################################################################################ | |
| unit-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| ############################################################################################ | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| repository: ${{ github.event.pull_request.head.repo.full_name }} | |
| ############################################################################################ | |
| - name: Set up cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/go-build | |
| ~/go/pkg/mod | |
| /home/runner/work/infrastructure-manager/infrastructure-manager/bin | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| ############################################################################################ | |
| - name: Set up go environment | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: 'go.mod' | |
| ############################################################################################ | |
| - name: Run unit tests | |
| run: | | |
| set -o pipefail | |
| make test 2>&1 | tee test-output.txt | |
| - name: Upload test output artifact | |
| uses: actions/upload-artifact@v5 | |
| if: success() || failure() | |
| with: | |
| name: "test-output" | |
| path: "test-output.txt" | |
| - name: Upload coverage artifact | |
| uses: actions/upload-artifact@v5 | |
| if: success() || failure() | |
| with: | |
| name: "code-coverage" | |
| path: "coverage.txt" | |
| - name: filter out coverage | |
| run: | | |
| #!/bin/bash | |
| filters=( | |
| "mock" | |
| "test" | |
| "github.com/kyma-project/infrastructure-manager/api" | |
| ) | |
| input="./coverage.txt" | |
| output="./coverage-filtered.txt" | |
| cp "$input" "$output" | |
| for i in "${filters[@]}"; do | |
| echo "filtering $i" | |
| cp "$output" "$output~" | |
| grep --invert-match $i "$output~" > "$output" | |
| wc -l $output | |
| done | |
| rm "$output~" | |
| # coverallsapp has an outage that causes the upload to fail, so we disable the coveralls upload for now | |
| # to avoid failing the whole workflow and the entire release. We can re-enable it once the outage is resolved. | |
| # - name: coveralls github action | |
| # uses: coverallsapp/github-action@v2.3.6 | |
| # with: | |
| # format: golang | |
| # file: ./coverage-filtered.txt | |
| # fail-on-error: false |