Skip to content
Merged
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
55 changes: 34 additions & 21 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,41 @@
name: Go
on: [push]
jobs:

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
name: Build
name: Build and Test
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
cache: true

- name: Download dependencies
run: go mod download

- name: Verify dependencies
run: go mod verify

- name: Run tests
run: go test -v -race -coverprofile=coverage.out ./...

- name: Set up Go 1.14
uses: actions/setup-go@v1
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
go-version: 1.14
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v1

- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi

- name: Build
run: go build -v .
file: ./coverage.out
flags: unittests
name: codecov-umbrella
if: github.event_name == 'push' && github.ref == 'refs/heads/master'