Skip to content

Commit

Permalink
Update CI workflow config
Browse files Browse the repository at this point in the history
Change-Id: I7901dd34fd48ab2aadd5f152a2f59acf2915593b
  • Loading branch information
jxskiss committed Aug 16, 2023
1 parent c80b4d6 commit 62c72d4
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,45 @@ on:

jobs:

build_and_test:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ^1.17
go-version: ^1.18

- name: Check out code
uses: actions/checkout@v3

- name: Get dependencies
run: go get -v -t -d ./...

- name: Build
run: go build -v ./...

test:
name: Test
runs-on: ${{ .matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
go: [ '1.18', '1.19', '1.20', "1.21" ]

steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}

- name: Checkout code
uses: actions/checkout@v3

- name: Test
run: go test -race -cover ./... -covermode=atomic -coverprofile coverage.out
run: go test -race -cover -covermode=atomic -coverprofile coverage.out -v ./...

- name: Upload coverage file
uses: codecov/codecov-action@v3

0 comments on commit 62c72d4

Please sign in to comment.