Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI to run go 1.19 + go 1.20 #128

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,55 @@ on:
- cron: "0 0 * * *"

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go: ["1.19","1.20", "1.x"]
steps:
- uses: actions/checkout@v2
- name: Set up Go ${{ matrix.go }}
uses: actions/[email protected]
with:
go-version: ${{ matrix.go }}
- name: Build
run: go build -v ./...
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/[email protected]
with:
go-version: '1.18'
- name: Run Coverage
run: go test -v -coverprofile=profile.cov ./...
- name: Send coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov

static_analysis:
name: Static Analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: '1.18'
id: go
- name: Install required static analysis tools
run: |
go get -u honnef.co/go/tools/cmd/staticcheck
- name: Check out code
uses: actions/[email protected]
- name: get dependencies
run: |
go get -v -t -d ./...
- name: Go vet
run: go vet ./...
- name: Check gofmt
run: diff -u <(echo -n) <(gofmt -d -s .)
go:
uses: openconfig/common-ci/.github/workflows/basic_go.yml@c2294c3c86c90e75e58c24a40d6f7f3364bbae9d
Loading