Skip to content

Commit

Permalink
Create go-test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
presbrey authored Aug 11, 2024
1 parent 9bf6dea commit 48ccb64
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/go-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Go Test

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:

test:
name: Test
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.15

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

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

- name: Run tests with race detection
run: go test -v -race ./...

- name: Run tests with coverage
run: go test -v -coverprofile=coverage.txt -covermode=atomic ./...

- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit 48ccb64

Please sign in to comment.