Skip to content

feat(metadata): functions for deletion Annotation/Label #46

feat(metadata): functions for deletion Annotation/Label

feat(metadata): functions for deletion Annotation/Label #46

Workflow file for this run

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