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

Commit 809cd9d

Browse files
committed
ci: add ci workflow
1 parent db204c0 commit 809cd9d

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/ci.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Go Client CI
2+
on:
3+
push:
4+
branches: main
5+
pull_request: { }
6+
workflow_dispatch: { }
7+
jobs:
8+
go-client:
9+
name: Go client tests
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 20
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-go@v5
15+
with:
16+
go-version: '1.22'
17+
cache: true
18+
cache-dependency-path: 'go.sum'
19+
- name: Build Go
20+
shell: bash
21+
id: build-go
22+
working-directory: cmd/zbctl
23+
run: ./build.sh
24+
- name: Run Go tests
25+
working-directory: .
26+
run: go test -mod=vendor -v ./...
27+
go-lint:
28+
name: Go linting
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v4
32+
- uses: actions/setup-go@v5
33+
with:
34+
go-version: '1.22'
35+
cache: true
36+
cache-dependency-path: 'clients/go/go.sum'
37+
- name: golangci-lint
38+
uses: golangci/golangci-lint-action@v4
39+
with:
40+
version: v1.60
41+
go-apidiff:
42+
if: github.event_name == 'pull_request'
43+
name: Go Backwards Compatibility
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v4
47+
with:
48+
fetch-depth: 0
49+
- uses: actions/setup-go@v5
50+
with:
51+
go-version: '1.22'
52+
cache: true
53+
cache-dependency-path: 'clients/go/go.sum'
54+
- uses: joelanford/go-apidiff@main

0 commit comments

Comments
 (0)