Skip to content

bump dependencies for fixing vulnerability #245

bump dependencies for fixing vulnerability

bump dependencies for fixing vulnerability #245

Workflow file for this run

name: Code
on:
pull_request:
paths-ignore:
- deploy/**
- "**/*.md"
permissions:
contents: read
pull-requests: read
env:
VERSION_KIND: v0.20.0
VERSION_GOLANGCILINT: latest
VERSION_GOLANG: '1.21.9'
jobs:
static-analysis:
name: Static Analysis
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Golang
uses: actions/setup-go@v5
with:
go-version: ${{ env.VERSION_GOLANG }}
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: ${{ env.VERSION_GOLANGCILINT }}
only-new-issues: true
args: --timeout 3m --verbose
#args: --issues-exit-code=0
#skip-cache: true
#skip-build-cache: true
#skip-pkg-cache: true
unit-testing:
name: Unit Testing
runs-on: ubuntu-22.04
steps:
- name: Create KinD cluster
uses: engineerd/setup-kind@v0.5.0
with:
version: ${{ env.VERSION_KIND }}
- name: Checkout Repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Golang
uses: actions/setup-go@v5
with:
go-version: ${{ env.VERSION_GOLANG }}
- name: Restore cached Go modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go${{ env.VERSION_GOLANG }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go${{ env.VERSION_GOLANG }}-
- name: Run unit tests
run: |
set -euo pipefail
kubectl cluster-info
go test -v -failfast -timeout 1m -coverprofile=coverage.cov ./internal
go tool cover -html=coverage.cov -o coverage.html
- name: Archive code coverage results
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: coverage.html