Skip to content

Update k8s provisioner to use server-side apply methodology (#5700) #938

Update k8s provisioner to use server-side apply methodology (#5700)

Update k8s provisioner to use server-side apply methodology (#5700) #938

Workflow file for this run

on:
push:
branches:
- main
paths:
- ".github/workflows/go-cover.yml"
- "**.go"
- "go.mod"
name: Test Go code with coverage
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
with:
go-version: 1.22
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Go test with coverage
run: |-
# Build list of packages to include in coverage, excluding generated code in 'proto/gen'
PACKAGES=$(go list ./... | grep -v 'proto/gen/' | tr '\n' ',' | sed -e 's/,$//' | sed -e 's/github.com\/rilldata\/rill/./g')
# Run tests with coverage output
# NOTE(2024-03-01): Coverage fails on the generated code in 'proto/gen' without GOEXPERIMENT=nocoverageredesign. See https://github.com/golang/go/issues/55953.
GOEXPERIMENT=nocoverageredesign go test ./... -short -v -race -covermode=atomic -coverprofile=coverage.out -coverpkg=$PACKAGES
env:
RILL_RUNTIME_DRUID_TEST_DSN: ${{ secrets.RILL_RUNTIME_DRUID_TEST_DSN }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.out
flags: go