diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..358f86a --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 diff --git a/go.mod b/go.mod index 123753f..6b44325 100644 --- a/go.mod +++ b/go.mod @@ -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 ( @@ -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