Skip to content

Commit

Permalink
chore(ci): run tests against PRs (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
displague authored Aug 2, 2024
1 parent 92a6f0a commit 3a5648d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,22 @@ on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Setup
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: '>=1.20.0'
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 ./...
run: go test -v -cover -parallel 4 ./...

0 comments on commit 3a5648d

Please sign in to comment.