nozo-moto / octocov-action

:octocat: GitHub Action for octocov

Home Page:https://github.com/marketplace/actions/run-octocov

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

octocov-action

:octocat: GitHub Action for octocov

comment

Usage

Add .octocov.yml ( or octocov.yml ) file to your repository.

( octocov init is useful for easy generation. )

# .octocov.yml Go example
coverage:
  paths:
    - path/to/coverage.out
codeToTestRatio:
  code:
    - '**/*.go'
    - '!**/*_test.go'
  test:
    - '**/*_test.go'
testExecutionTime:
  if: true
diff:
  datastores:
    - artifact://${GITHUB_REPOSITORY}
comment:
  if: is_pull_request
report:
  if: is_default_branch
  datastores:
    - artifact://${GITHUB_REPOSITORY}

And set up a workflow file as follows and run octocov on GitHub Actions.

# .github/workflows/ci.yml
name: Test

on:
  push:
    branches:
      - main
  pull_request:

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      -
        uses: actions/checkout@v3
      -
        uses: actions/setup-go@v4
        with:
          go-version-file: go.mod
      -
        name: Run tests with coverage report output
        run: go test ./... -coverprofile=coverage.out
      -
        uses: k1LoW/octocov-action@v0

See action.yml and octocov README for more details on how to configure it.

About

:octocat: GitHub Action for octocov

https://github.com/marketplace/actions/run-octocov

License:MIT License


Languages

Language:Shell 66.4%Language:Dockerfile 33.6%