-
Notifications
You must be signed in to change notification settings - Fork 51
24 lines (24 loc) · 779 Bytes
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
name: CI
on:
push:
branches: [ main ]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Setup
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Get dependencies
run: go mod download
# otel-cli's main test needs the binary built ahead of time
# also this validates it can acutally build before we get there
- name: Build
# build with -s -w to reduce binary size and verify that build in test
run: go build -v -ldflags="-s -w -X main.version=test -X main.commit=${{ github.sha }}"
- name: Test
run: go test -v -cover -parallel 4 ./...