Skip to content

Commit

Permalink
gha ci
Browse files Browse the repository at this point in the history
  • Loading branch information
wkhere committed Sep 13, 2023
1 parent 42c26cf commit f5132d5
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Go

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

jobs:

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

- uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: pkg+gocache-${{ github.sha }}
restore-keys: pkg+gocache-

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: go.mod

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

- name: Test with cover
run: go test -coverprofile=coverage.out ./...

- name: Convert coverage to lcov
uses: jandelgado/gcov2lcov-action@v1

- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: coverage.lcov

0 comments on commit f5132d5

Please sign in to comment.