feat!: Introduce interface for Collection to make it easier to test #85
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 -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 |