Skip to content

codecovの修正

codecovの修正 #16

Workflow file for this run

name: Codecov
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
services:
mongodb:
image: mongo:7.0.5
ports:
- 27017:27017
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Get dependencies
run: go get -v -t -d ./...
- name: Build
run: go build -v ./...
- name: Test
run: go test -v -coverprofile=coverage.txt ./...
env:
MONGO_CI_CONNECTION_STRING: mongodb://localhost:27017/?directConnection=true
MONGO_CI_DATABASE_NAME: testdb
ENV: ci
- name: Upload coverage reports to Codecov
# uses: codecov/codecov-action@v4.0.1
uses: codecov/codecov-action@v3
env:
token: ${{ secrets.CODECOV_TOKEN }}
slug: taako-502/go-mongodb-sample