feat(metadata): functions for deletion Annotation/Label #46
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: Go Test on Pull Requests | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
jobs: | |
go: | |
name: Check sources | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.19 | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Cache go modules | |
id: cache-mod | |
uses: actions/cache@v3 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Download dependencies | |
run: go mod download | |
if: steps.cache-mod.outputs.cache-hit != 'true' | |
- name: Check go mod status | |
run: | | |
go mod tidy | |
if [[ ! -z $(git status ':(exclude)bin/kustomize' ':(exclude)bin/controller-gen' -s) ]] | |
then | |
echo "Go mod state is not clean:" | |
git --no-pager diff ':(exclude)bin/kustomize' ':(exclude)bin/controller-gen' | |
exit 1 | |
fi | |
- name: Run Go Tests | |
run: make test | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 |