Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

ci: add ci workflow

ci: add ci workflow #5

Workflow file for this run

name: Go Client CI
on:
push:
branches: main
pull_request: { }
workflow_dispatch: { }
jobs:
go-client:
name: Go client tests
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
cache: true
cache-dependency-path: 'go.sum'
- name: Build Go
shell: bash
id: build-go
working-directory: cmd/zbctl
run: ./build.sh
- name: Run Go tests
working-directory: .
run: go test -mod=vendor -v ./...
go-lint:
name: Go linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
cache: true
cache-dependency-path: 'clients/go/go.sum'
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.60
go-apidiff:
if: github.event_name == 'pull_request'
name: Go Backwards Compatibility
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: '1.22'
cache: true
cache-dependency-path: 'clients/go/go.sum'
- uses: joelanford/go-apidiff@main