Skip to content

Commit

Permalink
Add GitHub Actions as the CI runner
Browse files Browse the repository at this point in the history
We are working on consolidating all CI to GitHub Actions.

Given the nature of `go`, the `setup-go` action supports `stable` and
`oldstable` which ensure this will always build against the 2 most
recent major versions of the language.
  • Loading branch information
jasonroelofs committed Mar 21, 2024
1 parent 06eaa80 commit 2707072
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI

on:
push:
branches:
- 'main'
pull_request: {}

defaults:
run:
shell: bash

jobs:
test:
name: Test Go ${{ matrix.go }}
runs-on: ubuntu-latest
strategy:
matrix:
go:
- 'stable'
- 'oldstable'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}

- name: Run Tests
run: |
go mod download
go test -v ./...
- name: Code style
run: |
gofmt -d ./
git diff --exit-code

0 comments on commit 2707072

Please sign in to comment.