Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【DO NOT MERGE】SonarCloud連携テスト #7

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
c1e6645
SonarCloud連携テスト
louvre2489 Oct 15, 2020
6a40861
テストが通るようにした
louvre2489 Oct 29, 2020
c6d055b
カバレッジを取れるようにした
louvre2489 Oct 29, 2020
036f0fa
ややこしいゴミを削除
louvre2489 Oct 29, 2020
5dbaf37
SonarCloud動け!
louvre2489 Oct 29, 2020
e99e8a3
SonarCloud動け!
louvre2489 Oct 29, 2020
acaf480
SonarCloud動け!
louvre2489 Oct 29, 2020
8649f17
SonarCloud用のプロパティファイルを追加
louvre2489 Oct 29, 2020
dbf0d31
SonarCloud用のプロパティファイルを追加
louvre2489 Oct 29, 2020
d8ab2f9
sbt-sonar用の設定を追加
louvre2489 Oct 29, 2020
d82497e
ここから先は、sonar-scalaは無効にしてSonarCloudだけでカバレッジ取得を試みる
louvre2489 Oct 29, 2020
0f603ad
SonarCloud動け!
louvre2489 Oct 29, 2020
cd453d2
SonarCloud動け!
louvre2489 Oct 29, 2020
4bb80ae
CircleCI動け!
louvre2489 Oct 30, 2020
4fe172c
CircleCI動け!
louvre2489 Oct 30, 2020
fbed298
CircleCI動け!
louvre2489 Oct 30, 2020
696f49d
CircleCI動け!
louvre2489 Oct 30, 2020
8f3e96e
ゴミを整理
louvre2489 Oct 30, 2020
c0274b1
build.sbtのオプションを削除
louvre2489 Oct 30, 2020
0f84f7b
build.sbtのオプションを復活
louvre2489 Oct 30, 2020
d94e8af
masterとの差分がわかるように変更ファイルを整理する
louvre2489 Oct 30, 2020
4f73d4b
Merge branch 'master' into sonar_test
louvre2489 Oct 30, 2020
a0a95db
masterとの差分がわかるように変更ファイルを整理する
louvre2489 Oct 30, 2020
9a6f245
masterとの差分がわかるように変更ファイルを整理する
louvre2489 Oct 30, 2020
6b4912f
CircleCI動け!
louvre2489 Nov 2, 2020
5573e15
CircleCI動け!
louvre2489 Nov 2, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 2.1

jobs:
build:
docker:
- image: chatwork/sbt-ci-openjdk8:jdk8u252-b09-1.3.10
steps:
- checkout
- run:
name: "coverage"
command: sbt -mem 2048 test coverage coverageReport
- sonarcloud/scan

orbs:
sonarcloud: sonarsource/sonarcloud@1.0.1

workflows:
main:
jobs:
- build:
context: SonarCloud
5 changes: 3 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ lazy val root: Project = (project in file("."))
),
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.1.1" % Test
)
)
),
coverageEnabled := true
)
3 changes: 2 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.3.4")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.3.4")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")
14 changes: 14 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
sonar.host.url=https://sonarcloud.io
sonar.organization=chatwork-sonar
sonar.projectName=scala-quiz
sonar.projectKey=chatwork_scala-quiz

sonar.sourceEncoding=UTF-8

sonar.sources=src/main
sonar.tests=src/test
Copy link
Collaborator Author

@louvre2489 louvre2489 Oct 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

この2行は不要かもしれない...

sonarにテストを指示するためのプロパティですが、
CircleCIでsbtでテストをするようにしているので、このプロパティは使用されることがない気がしています


sonar.language=scala

sonar.scala.scoverage.reportPath=\
target/scala-2.13/scoverage-report