-
Notifications
You must be signed in to change notification settings - Fork 5
43 lines (36 loc) · 1000 Bytes
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Build
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
mongodb-version: [ 6.0, 7.0, 8.0 ]
steps:
- uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '1.23.2'
cache: true
- name: Run build
run: go build cmd/example.go
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.8.0
with:
mongodb-version: ${{ matrix.mongodb-version }}
- name: Run tests
run: go test `go list ./... | grep -v ./cmd` -v -covermode=count -coverprofile=coverage.out
- name: Convert coverage.out to coverage.lcov
uses: jandelgado/gcov2lcov-action@v1
- name: Coveralls Report
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.lcov