Skip to content

changed mongodb repository to accept any interface #16

changed mongodb repository to accept any interface

changed mongodb repository to accept any interface #16

Workflow file for this run

name: Test
on:
push:
branches: [ main ]
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- '.github/workflows/test.yml'
pull_request:
branches: [ main ]
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- '.github/workflows/test.yml'
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.22']
services:
mongodb:
image: mongo:latest
ports:
- 27017:27017
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
cache: true
- name: Install dependencies
run: go mod download
- name: Run tests
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.txt
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}