Skip to content

Commit

Permalink
Use action-goveralls
Browse files Browse the repository at this point in the history
  • Loading branch information
roblillack committed Aug 27, 2024
1 parent 918399e commit bc9096e
Showing 1 changed file with 29 additions and 15 deletions.
44 changes: 29 additions & 15 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,44 @@ name: Build & Test

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

jobs:

build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.20', '1.11', '1.22', '1.23.x' ]
go-version: ["1.21", "1.22", "1.23.x"]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

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

- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Test
run: go test -v ./...

- name: Build
run: go build -v ./...
- name: Code coverage analysis
- run: go test -v -coverprofile=profile.cov ./...

- name: Test
run: go test -v ./...
- name: Send coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov
flag-name: Go-${{ matrix.go-version }}
parallel: true

- name: Code coverage analysis
run: go run github.com/mattn/[email protected]
finish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: shogo82148/actions-goveralls@v1
with:
parallel-finished: true

0 comments on commit bc9096e

Please sign in to comment.