Skip to content

feat(log): Provided module (#3) #4

feat(log): Provided module (#3)

feat(log): Provided module (#3) #4

Workflow file for this run

name: coverage
on:
push:
branches:
- main
workflow_call:
inputs:
go_version:
required: false
type: string
default: "1.20.0"
permissions:
contents: write
pull-requests: write
jobs:
coverage:
strategy:
matrix:
module:
- "config"
- "log"
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ inputs.go_version }}
- name: Download modules for ${{ matrix.module }}
working-directory: ${{ matrix.module }}
run: go mod download
- name: Run tests for ${{ matrix.module }}
working-directory: ${{ matrix.module }}
run: go test -v -race -failfast -coverpkg=./... -covermode=atomic -coverprofile=coverage.txt ./...
- name: Codecov for ${{ matrix.module }}
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: false
flags: ${{ matrix.module }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}