Skip to content

adds param for annotations to allow for restarting a connector via bo… #42

adds param for annotations to allow for restarting a connector via bo…

adds param for annotations to allow for restarting a connector via bo… #42

Workflow file for this run

name: CI Build and Test
on:
workflow_call:
push:
branches: ['main']
pull_request:
branches: ['main']
concurrency:
# Cancel in-progress runs on PR update
group: ci-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build-and-test:
name: Build & run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 2
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'
cache: true
- name: Install dependencies
run: go get ./...
- name: Build
run: go build -tags release -v ./...
- name: Test
run: make test
- name: Run v1beta2 + Internal Unit Tests (excluding v1beta1)
run: |
COVERPKG=$(go list -deps ./api/kessel/inventory/v1beta2/... ./internal/... | \
grep 'github.com/project-kessel/inventory-api' | \
grep -v '/v1beta1/' | \
paste -sd "," -)
echo "COVERPKG: $COVERPKG"
GOTOOLCHAIN=go1.25.7+auto go test -short -covermode=atomic \
-coverpkg=$COVERPKG \
-coverprofile=v1beta2-coverage.out \
./api/kessel/inventory/v1beta2/... ./internal/...
shell: bash
- name: Archive code coverage results
uses: actions/upload-artifact@v5
with:
name: code-coverage
path: coverage.txt
- name: Archive v1beta2 coverage
uses: actions/upload-artifact@v5
with:
name: v1beta2-code-coverage
path: v1beta2-coverage.out
- name: Upload main coverage to Codecov
id: code-cov-report
uses: codecov/codecov-action@v5
with:
files: coverage.txt
flags: main
disable_search: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload v1beta2 coverage to Codecov
uses: codecov/codecov-action@v5
with:
files: v1beta2-coverage.out
flags: v1beta2
disable_search: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}