diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 00000000..0586c18d --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,39 @@ +name: pr + +on: + pull_request: + paths-ignore: + - 'doc/**' + - 'docs/**' + - '*.md' + +jobs: + scala: + runs-on: ubuntu-latest + strategy: + matrix: + java: [ '11' ] + scala: [ + { version: '2.12.13' }, + { version: '2.12.12' }, + { version: '2.12.11' }, + { version: '2.12.10' }, + { version: '2.13.4' }, + { version: '2.13.3' }, + { version: '2.13.2' }, + { version: '2.13.1' }, + { version: '2.13.0' } + ] + steps: + - name: checkout the repo + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + + - name: run tests + run: sbt ++${{ matrix.scala.version }} test scripted diff --git a/src/main/scala/scoverage/ScoverageSbtPlugin.scala b/src/main/scala/scoverage/ScoverageSbtPlugin.scala index 04b4d41f..bf197e3d 100644 --- a/src/main/scala/scoverage/ScoverageSbtPlugin.scala +++ b/src/main/scala/scoverage/ScoverageSbtPlugin.scala @@ -55,11 +55,11 @@ object ScoverageSbtPlugin extends AutoPlugin { libraryDependencies ++= { if (coverageEnabled.value) Seq( - // We only add for "compile"" because of macros. This setting could be optimed to just "test" if the handling + // We only add for "compile" because of macros. This setting could be optimed to just "test" if the handling // of macro coverage was improved. - OrgScoverage %% (scalacRuntime(libraryDependencies.value)) % coverageScalacPluginVersion.value, + (OrgScoverage %% (scalacRuntime(libraryDependencies.value)) % coverageScalacPluginVersion.value).cross(CrossVersion.full), // We don't want to instrument the test code itself, nor add to a pom when published with coverage enabled. - OrgScoverage %% ScalacPluginArtifact % coverageScalacPluginVersion.value % ScoveragePluginConfig.name + (OrgScoverage %% ScalacPluginArtifact % coverageScalacPluginVersion.value % ScoveragePluginConfig.name).cross(CrossVersion.full) ) else Nil