bug-fix()!: ksctlagent, controller missing userID key in context #17
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: codecov | |
on: | |
push: | |
paths: | |
- 'internal/**' | |
- 'pkg/**' | |
branches: | |
- main | |
pull_request: | |
paths: | |
- 'internal/**' | |
- 'pkg/**' | |
branches: | |
- main | |
types: [ labeled, opened, synchronize, reopened ] | |
jobs: | |
codecov: | |
if: | | |
( | |
github.event.label.name == 'tests/enable' || | |
contains(github.event.pull_request.labels.*.name, 'tests/enable') | |
) | |
name: codecov coverage | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.21.0 | |
- name: Run coverage (UTILS) | |
working-directory: pkg/helpers | |
run: | | |
go test -race -coverprofile=../../coverage-utils.out -covermode=atomic -v | |
- name: Run coverage (LOGGER) | |
working-directory: pkg/logger | |
run: | | |
go test -race -coverprofile=../../coverage-logger.out -covermode=atomic -v | |
- name: Run coverage (K3S) | |
working-directory: internal/k8sdistros/k3s | |
run: | | |
go test -race -coverprofile=../../../coverage-k3s.out -covermode=atomic -v | |
- name: Run coverage (KUBEADM) | |
working-directory: internal/k8sdistros/kubeadm | |
run: | | |
go test -race -coverprofile=../../../coverage-kubeadm.out -covermode=atomic -v | |
- name: Run coverage (K8S_DISTRIBUTION) | |
working-directory: internal/k8sdistros | |
run: | | |
go test -race -coverprofile=../../../coverage-k8s.out -covermode=atomic -v | |
- name: Run coverage (CIVO) | |
working-directory: internal/cloudproviders/civo | |
run: | | |
go test -tags testing_civo -race -coverprofile=../../../coverage-civo.out -covermode=atomic -v | |
- name: Run coverage (AZURE) | |
working-directory: internal/cloudproviders/azure | |
run: | | |
go test -tags testing_azure -race -coverprofile=../../../coverage-azure.out -covermode=atomic -v | |
- name: Run coverage (AWS) | |
working-directory: internal/cloudproviders/aws | |
run: | | |
go test -tags testing_aws -race -coverprofile=../../../coverage-aws.out -covermode=atomic -v | |
- name: Run coverage (LOCAL) | |
working-directory: internal/cloudproviders/local | |
run: | | |
go test -race -coverprofile=../../../coverage-local.out -covermode=atomic -v | |
- name: Run coverage (LOCAL-Storage) | |
working-directory: internal/storage/local | |
run: | | |
go test -race -coverprofile=../../../coverage-local-store.out -covermode=atomic -v | |
- name: Run coverage (KUBERNETES-Storage) | |
working-directory: internal/storage/kubernetes | |
run: | | |
go test -race -coverprofile=../../../coverage-kubernetes-store.out -covermode=atomic -v | |
- name: Run coverage (MONGODB-Storage) | |
working-directory: internal/storage/external/mongodb | |
run: | | |
go test -race -coverprofile=../../../../coverage-mongodb-store.out -covermode=atomic -v | |
- name: Run coverage (ksctl-stateimport) | |
working-directory: ksctl-components/stateimport | |
run: | | |
go test -race -coverprofile=../../coverage-ksctl-stateimport.out -covermode=atomic -v | |
- name: Run coverage (ksctl-agent) | |
working-directory: ksctl-components/agent | |
run: | | |
go test -race -coverprofile=../../coverage-ksctl-agent.out -covermode=atomic -v | |
- name: Run coverage (ksctl-application-controller) | |
run: | | |
make test-controller CONTROLLER=application | |
- name: Run coverage (TESTS) | |
working-directory: test | |
run: | | |
export KSCTL_FAKE_FLAG_ENABLED="1" | |
go test -tags testing_local,testing_aws,testing_civo,testing_azure -bench=. -benchtime=1x -coverprofile=../coverage-mock-test.out -covermode=atomic -v | |
cd ../ | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |