From 1f85692b419d94746ab0ae301a62502b27049c75 Mon Sep 17 00:00:00 2001 From: JavierMonton Date: Tue, 30 Nov 2021 18:07:55 +0100 Subject: [PATCH 1/9] bringing back codecov for Scala 2 --- .github/workflows/ci-tests.yml | 35 ++++++++++++++++++++++++---------- README.md | 1 + project/plugins.sbt | 2 +- 3 files changed, 27 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 029044a9..9da2af36 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -12,18 +12,33 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v2 - name: Setup Scala - uses: olafurpg/setup-scala@v10 + uses: olafurpg/setup-scala@v13 with: java-version: "adopt@1.8" - name: Build and Unit Tests run: sbt -v -Dfile.encoding=UTF-8 +clean +test - #- name: Coverage Report - # run: sbt -v -Dfile.encoding=UTF-8 coverageReport - #- name: Codecov - # uses: codecov/codecov-action@v1 - # with: - # token: ${{ secrets.CODECOV_TOKEN }} - # verbose: false # optional (default = false) - # flags: unittests + coverage: + name: Code Coverage + strategy: + matrix: + scala: [2.12.15, 2.13.7] + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Scala + uses: olafurpg/setup-scala@v13 + with: + java-version: "adopt@1.8" + - name: Coverage for Scala 2 (until Scala 3 is available) + run: sbt ++${{ matrix.scala-coverage }} clean coverage test + - name: Coverage Report + run: sbt ++${{ matrix.scala-coverage }} coverageReport + - name: Codecov + uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + verbose: false # optional (default = false) + flags: unittests diff --git a/README.md b/README.md index 116d1cc6..ceaf06d0 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![CI Tests](https://github.com/data-tools/big-data-types/workflows/ci-tests/badge.svg)](https://github.com/data-tools/big-data-types/actions/workflows/ci-tests.yml) [![BQ IT](https://github.com/data-tools/big-data-types/workflows/BigQuery-Integration/badge.svg)](https://github.com/data-tools/big-data-types/actions/workflows/bigquery-integration.yml) ![Maven Central](https://img.shields.io/maven-central/v/io.github.data-tools/big-data-types-core_2.13) +[![codecov](https://codecov.io/gh/data-tools/big-data-types/branch/main/graph/badge.svg?token=1DUBMIAEO8)](https://codecov.io/gh/data-tools/big-data-types) [![Scala Steward badge](https://img.shields.io/badge/Scala_Steward-helping-blue.svg?style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAMAAAARSr4IAAAAVFBMVEUAAACHjojlOy5NWlrKzcYRKjGFjIbp293YycuLa3pYY2LSqql4f3pCUFTgSjNodYRmcXUsPD/NTTbjRS+2jomhgnzNc223cGvZS0HaSD0XLjbaSjElhIr+AAAAAXRSTlMAQObYZgAAAHlJREFUCNdNyosOwyAIhWHAQS1Vt7a77/3fcxxdmv0xwmckutAR1nkm4ggbyEcg/wWmlGLDAA3oL50xi6fk5ffZ3E2E3QfZDCcCN2YtbEWZt+Drc6u6rlqv7Uk0LdKqqr5rk2UCRXOk0vmQKGfc94nOJyQjouF9H/wCc9gECEYfONoAAAAASUVORK5CYII=)](https://scala-steward.org) A type-safe library to transform Case Classes into Database schemas and to convert implemented types into another types diff --git a/project/plugins.sbt b/project/plugins.sbt index e3a64609..76714bbf 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,4 @@ -//addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.2") addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.10") addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2") addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.15.0") From caf167adc8e654b318d58e085be79fc297369436 Mon Sep 17 00:00:00 2001 From: JavierMonton Date: Tue, 30 Nov 2021 18:32:17 +0100 Subject: [PATCH 2/9] testing matrix tests --- .github/workflows/ci-tests.yml | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 9da2af36..2b704d64 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -9,21 +9,11 @@ env: jobs: test: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Setup Scala - uses: olafurpg/setup-scala@v13 - with: - java-version: "adopt@1.8" - - name: Build and Unit Tests - run: sbt -v -Dfile.encoding=UTF-8 +clean +test - coverage: - name: Code Coverage + name: Tests + Code Coverage strategy: matrix: - scala: [2.12.15, 2.13.7] + scala: [2.12.15, 2.13.7, 3.0.2] + scala-coverage: [2.12.15, 2.13.7] runs-on: ubuntu-latest steps: - name: Checkout @@ -32,6 +22,8 @@ jobs: uses: olafurpg/setup-scala@v13 with: java-version: "adopt@1.8" + - name: Tests + run: sbt ++${{ matrix.scala }} clean test - name: Coverage for Scala 2 (until Scala 3 is available) run: sbt ++${{ matrix.scala-coverage }} clean coverage test - name: Coverage Report From 5b06c245fb57b921ce8b4e9f583c36a889cfcd3c Mon Sep 17 00:00:00 2001 From: JavierMonton Date: Tue, 30 Nov 2021 18:35:34 +0100 Subject: [PATCH 3/9] split tests by Scala version --- .github/workflows/ci-tests.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 2b704d64..32f5b8a9 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -9,10 +9,25 @@ env: jobs: test: - name: Tests + Code Coverage + name: Build and Test + strategy: + matrix: + scala: [ 2.12.15, 2.13.7, 3.0.2 ] + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Scala + uses: olafurpg/setup-scala@v13 + with: + java-version: "adopt@1.8" + - name: Build and Unit Tests + run: sbt ++${{ matrix.scala-coverage }} clean test + + coverage: + name: Code Coverage strategy: matrix: - scala: [2.12.15, 2.13.7, 3.0.2] scala-coverage: [2.12.15, 2.13.7] runs-on: ubuntu-latest steps: @@ -22,8 +37,6 @@ jobs: uses: olafurpg/setup-scala@v13 with: java-version: "adopt@1.8" - - name: Tests - run: sbt ++${{ matrix.scala }} clean test - name: Coverage for Scala 2 (until Scala 3 is available) run: sbt ++${{ matrix.scala-coverage }} clean coverage test - name: Coverage Report From 9696160d8fad64b3f98df2201c638c710706f09e Mon Sep 17 00:00:00 2001 From: JavierMonton Date: Tue, 30 Nov 2021 18:49:13 +0100 Subject: [PATCH 4/9] fix scala matrix version --- .github/workflows/ci-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 32f5b8a9..fdd958ab 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -22,7 +22,7 @@ jobs: with: java-version: "adopt@1.8" - name: Build and Unit Tests - run: sbt ++${{ matrix.scala-coverage }} clean test + run: sbt ++${{ matrix.scala }} clean test coverage: name: Code Coverage From 62ec0a8e0850278269367ef4819d9c19bd356b56 Mon Sep 17 00:00:00 2001 From: JavierMonton Date: Tue, 30 Nov 2021 18:53:35 +0100 Subject: [PATCH 5/9] back to cross testing due to errors in different module versions --- .github/workflows/ci-tests.yml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index fdd958ab..8cc76d53 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -10,37 +10,27 @@ env: jobs: test: name: Build and Test - strategy: - matrix: - scala: [ 2.12.15, 2.13.7, 3.0.2 ] runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v1 - name: Setup Scala uses: olafurpg/setup-scala@v13 with: java-version: "adopt@1.8" - name: Build and Unit Tests - run: sbt ++${{ matrix.scala }} clean test - + run: sbt -v -Dfile.encoding=UTF-8 +clean +test coverage: name: Code Coverage strategy: matrix: - scala-coverage: [2.12.15, 2.13.7] + scala: [2.12.15, 2.13.7] runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Setup Scala - uses: olafurpg/setup-scala@v13 - with: - java-version: "adopt@1.8" - name: Coverage for Scala 2 (until Scala 3 is available) - run: sbt ++${{ matrix.scala-coverage }} clean coverage test + run: sbt ++${{ matrix.scala }} clean coverage test - name: Coverage Report - run: sbt ++${{ matrix.scala-coverage }} coverageReport + run: sbt ++${{ matrix.scala }} coverageReport - name: Codecov uses: codecov/codecov-action@v1 with: From 6adb2bebee34daceaca0b54d3bd8feafac4600d5 Mon Sep 17 00:00:00 2001 From: JavierMonton Date: Tue, 30 Nov 2021 19:01:51 +0100 Subject: [PATCH 6/9] supported scala versions in root --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 21811a9a..d87f78b3 100644 --- a/build.sbt +++ b/build.sbt @@ -78,7 +78,7 @@ lazy val root = (project in file(".")) .settings( noPublishSettings, scalacOptions ++= scalacCommon, - crossScalaVersions := Nil) + crossScalaVersions := supportedScalaVersions) .aggregate( core, bigquery, From 7f13d5071545c78f4333b7584e2fe1cee0979514 Mon Sep 17 00:00:00 2001 From: JavierMonton Date: Tue, 30 Nov 2021 19:04:04 +0100 Subject: [PATCH 7/9] forcing Scala version for codecov --- .github/workflows/ci-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 8cc76d53..48ec9d07 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -28,9 +28,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Coverage for Scala 2 (until Scala 3 is available) - run: sbt ++${{ matrix.scala }} clean coverage test + run: sbt ++${{ matrix.scala }}! clean coverage test - name: Coverage Report - run: sbt ++${{ matrix.scala }} coverageReport + run: sbt ++${{ matrix.scala }}! coverageReport - name: Codecov uses: codecov/codecov-action@v1 with: From 0159633b4800afe53ae45e98a47218d2fb3ebe71 Mon Sep 17 00:00:00 2001 From: JavierMonton Date: Wed, 1 Dec 2021 18:13:35 +0100 Subject: [PATCH 8/9] ci + coverage --- .github/workflows/ci-tests.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 48ec9d07..55179ced 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -8,12 +8,12 @@ env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} jobs: - test: + unit-test: name: Build and Test runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v2 - name: Setup Scala uses: olafurpg/setup-scala@v13 with: @@ -27,10 +27,16 @@ jobs: scala: [2.12.15, 2.13.7] runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Scala + uses: olafurpg/setup-scala@v13 + with: + java-version: "adopt@1.8" - name: Coverage for Scala 2 (until Scala 3 is available) - run: sbt ++${{ matrix.scala }}! clean coverage test + run: sbt ++${{ matrix.scala }} clean coverage test - name: Coverage Report - run: sbt ++${{ matrix.scala }}! coverageReport + run: sbt ++${{ matrix.scala }} coverageReport - name: Codecov uses: codecov/codecov-action@v1 with: From 91f0c09aa4078f9189feae0fb4fe78728d9c911c Mon Sep 17 00:00:00 2001 From: JavierMonton Date: Wed, 1 Dec 2021 18:23:04 +0100 Subject: [PATCH 9/9] Nil versions for root project --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index d87f78b3..21811a9a 100644 --- a/build.sbt +++ b/build.sbt @@ -78,7 +78,7 @@ lazy val root = (project in file(".")) .settings( noPublishSettings, scalacOptions ++= scalacCommon, - crossScalaVersions := supportedScalaVersions) + crossScalaVersions := Nil) .aggregate( core, bigquery,