Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Scala coverage example

License

NotificationsYou must be signed in to change notification settings

codecov/example-scala

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codecov Scala Example

FOSSA Status

Guide

GitHub Actions Setup

You should first get the repository upload token fromcodecov

Add the following to your.github/workflows/test.yml file.

name:Test workflowon:[push, pull_request]jobs:build:runs-on:ubuntu-latestname:Test scalasteps:      -uses:actions/checkout@v4      -uses:actions/setup-java@v4with:distribution:'adopt'java-version:'21'      -name:Run testsrun:sbt coverage test coverageReport      -uses:codecov/codecov-action@v4with:fail_ci_if_error:truetoken:${{ secrets.CODECOV_TOKEN }}

Here we frist checkout the code, then setup java, run the tests and generate the coverage report. Finally, we upload the report to codecov using the codecov-action.

When all finished, you could also add a badge on readme like following.

[![codecov](https://codecov.io/gh/YOUR_ACCOUNT/YOUR_REPO/branch/YOUR_BRANCH/graph/badge.svg)](https://codecov.io/gh/YOUR_ACCOUNT/YOUR_REPO)

Produce Coverage Reports

  1. Addscoverage to plugin list
  • addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.11") asseen here
  1. Addcoverage andcoverageReport tosbt
  • sbt clean coverage test coverageReport asseen here

Caveats

Private Repo

Repository tokens are required for

  • (a) all private repos,
  • (b) public repos not using Travis-CI, CircleCI or AppVeyor.

Find your repository token at Codecov and provide via appending-t <your upload token> to you where you upload reports.

Links

License

FOSSA Status

About

Scala coverage example

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors12

Languages


[8]ページ先頭

©2009-2025 Movatter.jp