File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
src/main/scala/org/scoverage/coveralls Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,26 @@ Travis build and you should see coverage reports appear on [coveralls][].
1071072) Job done! Commit these changes to kick off your GitHub Actions
108108build and you should see coverage reports appear on [coveralls][].
109109
110+ # # CircleCI Integration
111+
112+ Enable CircleCI support in your `build.sbt` :
113+
114+ ` ` ` scala
115+ import org.scoverage.coveralls.Imports.CoverallsKeys._
116+ import org.scoverage.coveralls.CircleCI
117+
118+ coverallsService := Some(CircleCI)
119+ ` ` `
120+
121+ Add the following step to your `config.yml` right after your test step :
122+
123+ ` ` ` yaml
124+ - run:
125+ name: Generate and upload coverage report
126+ when: always
127+ command: sbt ";coverageReport ;coverageAggregate ;coveralls"
128+ ` ` `
129+
110130# # Manual Usage
111131
1121321) Get the repo token for your repo from [coveralls][].
Original file line number Diff line number Diff line change @@ -94,3 +94,10 @@ case object GitHubActions extends CIService {
9494 }
9595 }
9696}
97+
98+ object CircleCI extends CIService {
99+ def name : String = " circleci"
100+ def jobId : Option [String ] = sys.env.get(" CIRCLE_BUILD_NUM" )
101+ def pullRequest : Option [String ] = sys.env.get(" CIRCLE_PULL_REQUEST" ).map(_.split(" /" ).last)
102+ def currentBranch : Option [String ] = sys.env.get(" CIRCLE_BRANCH" )
103+ }
You can’t perform that action at this time.
0 commit comments