Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
156 changes: 156 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
component_management:
default_rules: # default rules that will be inherited by all components
statuses:
- type: project # in this case every component that doens't have a status defined will have a project type one
target: auto
branches:
- "!main"
individual_components:
- component_id: account
name: account
paths:
- internal/services/account/**
- component_id: applesilicon
name: applesilicon
paths:
- internal/services/applesilicon/**
- component_id: autoscaling
name: autoscaling
paths:
- internal/services/autoscaling/**
- component_id: az
name: az
paths:
- internal/services/az/**
- component_id: baremetal
name: baremetal
paths:
- internal/services/baremetal/**
- component_id: billing
name: billing
paths:
- internal/services/billing/**
- component_id: block
name: block
paths:
- internal/services/block/**
- component_id: cockpit
name: cockpit
paths:
- internal/services/cockpit/**
- component_id: container
name: container
paths:
- internal/services/container/**
- component_id: domain
name: domain
paths:
- internal/services/domain/**
- component_id: edgeservices
name: edgeservices
paths:
- internal/services/edgeservices/**
- component_id: file
name: file
paths:
- internal/services/file/**
- component_id: flexibleip
name: flexibleip
paths:
- internal/services/flexibleip/**
- component_id: function
name: function
paths:
- internal/services/function/**
- component_id: iam
name: iam
paths:
- internal/services/iam/**
- component_id: inference
name: inference
paths:
- internal/services/inference/**
- component_id: instance
name: instance
paths:
- internal/services/instance/**
- component_id: iot
name: iot
paths:
- internal/services/iot/**
- component_id: ipam
name: ipam
paths:
- internal/services/ipam/**
- component_id: jobs
name: jobs
paths:
- internal/services/jobs/**
- component_id: k8s
name: k8s
paths:
- internal/services/k8s/**
- component_id: keymanager
name: keymanager
paths:
- internal/services/keymanager/**
- component_id: lb
name: lb
paths:
- internal/services/lb/**
- component_id: marketplace
name: marketplace
paths:
- internal/services/marketplace/**
- component_id: mnq
name: mnq
paths:
- internal/services/mnq/**
- component_id: mongodb
name: mongodb
paths:
- internal/services/mongodb/**
- component_id: object
name: object
paths:
- internal/services/object/**
- component_id: rdb
name: rdb
paths:
- internal/services/rdb/**
- component_id: redis
name: redis
paths:
- internal/services/redis/**
- component_id: registry
name: registry
paths:
- internal/services/registry/**
- component_id: scwconfig
name: scwconfig
paths:
- internal/services/scwconfig/**
- component_id: sdb
name: sdb
paths:
- internal/services/sdb/**
- component_id: secret
name: secret
paths:
- internal/services/secret/**
- component_id: tem
name: tem
paths:
- internal/services/tem/**
- component_id: vpc
name: vpc
paths:
- internal/services/vpc/**
- component_id: vpcgw
name: vpcgw
paths:
- internal/services/vpcgw/**
- component_id: webhosting
name: webhosting
paths:
- internal/services/webhosting/**
49 changes: 49 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Code Coverage

on:
pull_request:
merge_group:
push:
branches:
- main
- master

permissions:
contents: read

jobs:
coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 1

- name: Install Go
uses: actions/setup-go@v6
with:
go-version: stable

- name: Install Terraform
uses: hashicorp/setup-terraform@v3

- name: Build binaries
run: make build

- name: Verify go.mod is tidy
run: |
go mod tidy
git diff --exit-code
- name: Run coverage
run: go tool gotestsum --format github-actions --junitfile junit.xml -- -coverprofile=coverage.out -covermode=count ./...

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5

- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
Loading