Skip to content

CI

CI #11

Workflow file for this run

name: CI
on:
push:
branches: [v3.0]
pull_request:
branches: [v3.0]
permissions:
id-token: write
contents: read
env:
ARTIFACTORY_URL: ${{ vars.ARTIFACTORY_URL }}
jobs:
vet:
name: Vet & Lint
runs-on: ${{ github.event.pull_request.head.repo.fork && 'ubuntu-latest' || 'ubuntu-x64' }}
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
with:
go-version: "1.24"
- name: Authenticate to Artifactory
if: ${{ !github.event.pull_request.head.repo.fork }}
uses: ./.github/actions/artifactory-oidc
- name: Download dependencies
run: go mod download
- name: Vet
run: go vet ./...
test:
name: Test (Go ${{ matrix.go-version }})
runs-on: ${{ github.event.pull_request.head.repo.fork && 'ubuntu-latest' || 'ubuntu-x64' }}
strategy:
fail-fast: false
matrix:
go-version: ["1.22", "1.23", "1.24"]
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
with:
go-version: ${{ matrix.go-version }}
- name: Authenticate to Artifactory
if: ${{ !github.event.pull_request.head.repo.fork }}
uses: ./.github/actions/artifactory-oidc
- name: Download dependencies
run: go mod download
- name: Test
run: go test -race -coverprofile=cover.out ./...
- name: Upload coverage
uses: actions/upload-artifact@v4
with:
name: coverage-go${{ matrix.go-version }}
path: cover.out
retention-days: 7
build:
name: Build Verification
runs-on: ${{ github.event.pull_request.head.repo.fork && 'ubuntu-latest' || 'ubuntu-x64' }}
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
with:
go-version: "1.24"
- name: Authenticate to Artifactory
if: ${{ !github.event.pull_request.head.repo.fork }}
uses: ./.github/actions/artifactory-oidc
- name: Download dependencies
run: go mod download
- name: Verify module
run: go mod verify
- name: Build
run: go build ./...