Skip to content

Add path filters to workflow triggers for optimized CI/CD builds #76

Add path filters to workflow triggers for optimized CI/CD builds

Add path filters to workflow triggers for optimized CI/CD builds #76

Workflow file for this run

name: API Build
permissions:
contents: read
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23'
- name: Build
run: |
cd apiserver
go build -v ./...
- name: Install lint tool
run: |
cd apiserver
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
- name: Lint
run: |
cd apiserver
golangci-lint run
- name: Run Tests and Generate Coverage
run: |
cd apiserver
go test -v -coverprofile=coverage.txt ./...
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}