diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 46f9eee..cb08508 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,7 +54,13 @@ jobs: - uses: coursier/cache-action@v5 - name: Setup database - run: psql postgresql://postgres:postgres@localhost:5432/mag_db -f balta/src/test/resources/db/postgres/02_users.ddl + run: | + psql postgresql://postgres:postgres@localhost:5432/mag_db -f balta/src/test/resources/db/postgres/02_users.ddl + psql postgresql://postgres:postgres@localhost:5432/mag_db -f balta/src/test/resources/db/postgres/03_schema_testing.ddl + psql postgresql://postgres:postgres@localhost:5432/mag_db -f balta/src/test/resources/db/postgres/04_testing.base_types.ddl + psql postgresql://postgres:postgres@localhost:5432/mag_db -f balta/src/test/resources/db/postgres/05_testing._base_types_data.sql + psql postgresql://postgres:postgres@localhost:5432/mag_db -f balta/src/test/resources/db/postgres/06_testing.pg_types.ddl + psql postgresql://postgres:postgres@localhost:5432/mag_db -f balta/src/test/resources/db/postgres/07_testing_pg_types_data.sql - name: Setup Scala uses: olafurpg/setup-scala@v10 @@ -63,3 +69,6 @@ jobs: - name: Build and run unit tests run: sbt ++${{matrix.scala}} test doc + + - name: Build and run integration tests + run: sbt ++${{matrix.scala}} testIT diff --git a/.github/workflows/test_filenames_check.yml b/.github/workflows/test_filenames_check.yml index aeaa01d..e94aa77 100644 --- a/.github/workflows/test_filenames_check.yml +++ b/.github/workflows/test_filenames_check.yml @@ -36,6 +36,6 @@ jobs: name-patterns: '*UnitTests.*,*IntegrationTests.*' paths: '**/src/test/scala/**' report-format: 'console' - excludes: 'server/src/test/scala/za/co/absa/atum/server/api/TestData.scala,server/src/test/scala/za/co/absa/atum/server/api/TestTransactorProvider.scala,server/src/test/scala/za/co/absa/atum/server/ConfigProviderTest.scala' + excludes: 'balta/src/test/scala/za/co/absa/db/balta/testing/*' verbose-logging: 'false' fail-on-violation: 'true' diff --git a/balta/src/main/scala/za/co/absa/db/balta/classes/QueryResultRow.scala b/balta/src/main/scala/za/co/absa/db/balta/classes/QueryResultRow.scala index 4a20ddb..7c771ad 100644 --- a/balta/src/main/scala/za/co/absa/db/balta/classes/QueryResultRow.scala +++ b/balta/src/main/scala/za/co/absa/db/balta/classes/QueryResultRow.scala @@ -49,7 +49,7 @@ class QueryResultRow private[classes](val rowNumber: Int, def getAs[T](columnLabel: String, transformer: TransformerFnc[T]): Option[T] = getAs(columnNumber(columnLabel), transformer) def getAs[T](columnLabel: String): Option[T] = apply(columnNumber(columnLabel)).map(_.asInstanceOf[T]) - def getBoolean(column: Int): Option[Boolean] = getAs(column: Int, _.asInstanceOf[Boolean]) + def getBoolean(column: Int): Option[Boolean] = getAs(column: Int, item => item.asInstanceOf[Boolean]) def getBoolean(columnLabel: String): Option[Boolean] = getBoolean(columnNumber(columnLabel)) def getChar(column: Int): Option[Char] = {