Skip to content

Merge pull request #415 from pohly/deduplication #748

Merge pull request #415 from pohly/deduplication

Merge pull request #415 from pohly/deduplication #748

Workflow file for this run

name: Test
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
go-version: ["1.21", "1.22", "1.23"]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v4
- name: Test klog
run: |
go get -t -v ./...
go test -v -race ./...
- name: Test examples
run: cd examples && go test -v -race ./...
apidiff:
runs-on: ubuntu-latest
if: github.base_ref
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.23
- name: Add GOBIN to PATH
run: echo "PATH=$(go env GOPATH)/bin:$PATH" >>$GITHUB_ENV
- name: Install dependencies
run: go install golang.org/x/exp/cmd/apidiff@latest
- name: Checkout old code
uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}
path: "old"
- name: Checkout new code
uses: actions/checkout@v4
with:
path: "new"
- name: APIDiff
run: ./hack/verify-apidiff.sh -d ../old
working-directory: "new"