Skip to content

Commit 175a071

Browse files
committed
chore: re-enabled test-coverage and sbt-tl bump
1 parent b68f72f commit 175a071

File tree

3 files changed

+65
-24
lines changed

3 files changed

+65
-24
lines changed

.github/workflows/ci.yml

+61-20
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ env:
1919

2020
jobs:
2121
build:
22-
name: Build and Test
22+
name: Test
2323
strategy:
2424
matrix:
25-
os: [ubuntu-latest]
25+
os: [ubuntu-22.04]
2626
scala: [2.13, 2.12, 3]
2727
java: [temurin@8, temurin@11, temurin@17]
2828
project: [rootJS, rootJVM, rootNative]
@@ -46,14 +46,14 @@ jobs:
4646
runs-on: ${{ matrix.os }}
4747
timeout-minutes: 60
4848
steps:
49-
- name: Install sbt
50-
uses: sbt/setup-sbt@v1
51-
5249
- name: Checkout current branch (full)
5350
uses: actions/checkout@v4
5451
with:
5552
fetch-depth: 0
5653

54+
- name: Setup sbt
55+
uses: sbt/setup-sbt@v1
56+
5757
- name: Setup Java (temurin@8)
5858
id: setup-java-temurin-8
5959
if: matrix.java == 'temurin@8'
@@ -97,7 +97,7 @@ jobs:
9797
run: sbt githubWorkflowCheck
9898

9999
- name: Check headers
100-
if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest'
100+
if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-22.04'
101101
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' headerCheckAll
102102

103103
- name: scalaJSLink
@@ -112,11 +112,11 @@ jobs:
112112
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' test
113113

114114
- name: Check binary compatibility
115-
if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest'
115+
if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-22.04'
116116
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' mimaReportBinaryIssues
117117

118118
- name: Generate API documentation
119-
if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest'
119+
if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-22.04'
120120
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' doc
121121

122122
- name: Make target directories
@@ -140,18 +140,18 @@ jobs:
140140
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/staging/5.0')
141141
strategy:
142142
matrix:
143-
os: [ubuntu-latest]
143+
os: [ubuntu-22.04]
144144
java: [temurin@8]
145145
runs-on: ${{ matrix.os }}
146146
steps:
147-
- name: Install sbt
148-
uses: sbt/setup-sbt@v1
149-
150147
- name: Checkout current branch (full)
151148
uses: actions/checkout@v4
152149
with:
153150
fetch-depth: 0
154151

152+
- name: Setup sbt
153+
uses: sbt/setup-sbt@v1
154+
155155
- name: Setup Java (temurin@8)
156156
id: setup-java-temurin-8
157157
if: matrix.java == 'temurin@8'
@@ -310,18 +310,18 @@ jobs:
310310
if: github.event.repository.fork == false && github.event_name != 'pull_request'
311311
strategy:
312312
matrix:
313-
os: [ubuntu-latest]
313+
os: [ubuntu-22.04]
314314
java: [temurin@8]
315315
runs-on: ${{ matrix.os }}
316316
steps:
317-
- name: Install sbt
318-
uses: sbt/setup-sbt@v1
319-
320317
- name: Checkout current branch (full)
321318
uses: actions/checkout@v4
322319
with:
323320
fetch-depth: 0
324321

322+
- name: Setup sbt
323+
uses: sbt/setup-sbt@v1
324+
325325
- name: Setup Java (temurin@8)
326326
id: setup-java-temurin-8
327327
if: matrix.java == 'temurin@8'
@@ -367,22 +367,63 @@ jobs:
367367
modules-ignore: rootjs_2.13 rootjs_2.12 rootjs_3 docs_2.13 docs_2.12 docs_3 rootjvm_2.13 rootjvm_2.12 rootjvm_3 rootnative_2.13 rootnative_2.12 rootnative_3
368368
configs-ignore: test scala-tool scala-doc-tool test-internal
369369

370-
site:
371-
name: Generate Site
370+
coverage:
371+
name: Run Test Coverage and Upload
372+
if: github.ref == 'refs/heads/staging/5.0' || (github.event_name == 'pull_request' && github.base_ref == 'staging/5.0')
372373
strategy:
373374
matrix:
374-
os: [ubuntu-latest]
375+
os: [ubuntu-22.04]
376+
scala: [2.13]
375377
java: [temurin@11]
376378
runs-on: ${{ matrix.os }}
377379
steps:
378-
- name: Install sbt
380+
- name: Checkout current branch (fast)
381+
uses: actions/checkout@v4
382+
383+
- name: Setup sbt
379384
uses: sbt/setup-sbt@v1
380385

386+
- name: Setup Java (temurin@11)
387+
id: setup-java-temurin-11
388+
if: matrix.java == 'temurin@11'
389+
uses: actions/setup-java@v4
390+
with:
391+
distribution: temurin
392+
java-version: 11
393+
cache: sbt
394+
395+
- name: sbt update
396+
if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false'
397+
run: sbt +update
398+
399+
- name: Generate coverage report
400+
run: sbt '++ ${{ matrix.scala }}' coverage 'parsley / test' 'parsleyDebug / test' coverageReport
401+
402+
- name: Upload coverage to Code Climate
403+
env:
404+
CC_TEST_REPORTER_ID: c1f669dece75a1d69bf0dc45a682d64837badc112b8098271ccc0dca1bbc7a09
405+
uses: paambaati/[email protected]
406+
with:
407+
coverageLocations: |
408+
${{github.workspace}}/parsley/jvm/target/scala-2.13/coverage-report/cobertura.xml:cobertura
409+
${{github.workspace}}/parsley-debug/jvm/target/scala-2.13/coverage-report/cobertura.xml:cobertura
410+
411+
site:
412+
name: Generate Site
413+
strategy:
414+
matrix:
415+
os: [ubuntu-22.04]
416+
java: [temurin@11]
417+
runs-on: ${{ matrix.os }}
418+
steps:
381419
- name: Checkout current branch (full)
382420
uses: actions/checkout@v4
383421
with:
384422
fetch-depth: 0
385423

424+
- name: Setup sbt
425+
uses: sbt/setup-sbt@v1
426+
386427
- name: Setup Java (temurin@8)
387428
id: setup-java-temurin-8
388429
if: matrix.java == 'temurin@8'

build.sbt

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ inThisBuild(List(
3030
tlCiScalafmtCheck := false,
3131
tlCiHeaderCheck := true,
3232
githubWorkflowJavaVersions := Seq(Java8, JavaLTS, JavaLatest),
33-
//githubWorkflowAddedJobs += testCoverageJob(githubWorkflowGeneratedCacheSteps.value.toList),
33+
githubWorkflowAddedJobs += testCoverageJob(githubWorkflowGeneratedCacheSteps.value.toList),
3434
githubWorkflowConcurrency := None, // this allows us to not fail the pipeline on double commit
3535
// Website Configuration
3636
tlSitePublishBranch := Some(mainBranch),
@@ -128,7 +128,7 @@ lazy val docs = project
128128
),
129129
)
130130

131-
/*def testCoverageJob(cacheSteps: List[WorkflowStep]) = WorkflowJob(
131+
def testCoverageJob(cacheSteps: List[WorkflowStep]) = WorkflowJob(
132132
id = "coverage",
133133
name = "Run Test Coverage and Upload",
134134
cond = Some(s"github.ref == 'refs/heads/$mainBranch' || (github.event_name == 'pull_request' && github.base_ref == '$mainBranch')"),
@@ -148,6 +148,6 @@ lazy val docs = project
148148
).mkString("\n")),
149149
)
150150
)
151-
)*/
151+
)
152152

153153
def coverageReport(project: String) = s"$${{github.workspace}}/$project/jvm/target/scala-2.13/coverage-report/cobertura.xml:cobertura"

project/plugins.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
val sbtTypelevelVersion = "0.7.4"
1+
val sbtTypelevelVersion = "0.7.5"
22
val circeVersion = "0.14.10"
33

44
resolvers ++= Opts.resolver.sonatypeOssSnapshots

0 commit comments

Comments
 (0)