Skip to content

Commit

Permalink
Add CI testing workflow
Browse files Browse the repository at this point in the history
Add a CI test workflow
* Build binary.
* Run tests.

Signed-off-by: SuperQ <[email protected]>
  • Loading branch information
SuperQ committed Feb 22, 2024
1 parent b47d147 commit abcdc2a
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 7 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build

on:
- pull_request

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
test:
strategy:
matrix:
go:
- "1.21"
- "1.22"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: install Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: ${{ matrix.go }}
- name: Build
run: make build
- name: Test
run: make test-ci
11 changes: 4 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
module github.com/reddit/monoceros

go 1.19
go 1.21

require (
github.com/go-cmd/cmd v1.4.1
github.com/stretchr/testify v1.8.0 // indirect
go.uber.org/zap v1.21.0
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/google/go-cmp v0.6.0
github.com/prometheus/client_golang v1.13.0
github.com/prometheus/common v0.37.0
github.com/prometheus/procfs v0.8.0
github.com/urfave/cli/v2 v2.11.1
go.uber.org/zap v1.21.0
gopkg.in/yaml.v3 v3.0.1
)

require (
Expand All @@ -28,6 +24,7 @@ require (
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/stretchr/testify v1.8.0 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
Expand Down

0 comments on commit abcdc2a

Please sign in to comment.