Skip to content

Enable more modules in our CI + fix missing triggers #308

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

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
29 changes: 27 additions & 2 deletions .github/workflows/test_scala_no_spark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ on:
- 'aggregator/**'
- 'online/**'
- 'api/**'
- 'hub/**'
- 'service/**'
- 'service_commons/**'
- 'orchestration/**'
- 'cloud_gcp/**'
- 'cloud_aws/**'
- '.github/workflows/test_scala_no_spark.yaml'
- 'build.sbt'
pull_request:
Expand All @@ -19,6 +25,12 @@ on:
- 'aggregator/**'
- 'online/**'
- 'api/**'
- 'hub/**'
- 'service/**'
- 'service_commons/**'
- 'orchestration/**'
- 'cloud_gcp/**'
- 'cloud_aws/**'
- '.github/workflows/test_scala_no_spark.yaml'
- 'build.sbt'

Expand Down Expand Up @@ -81,9 +93,22 @@ jobs:
export SBT_OPTS="-Xmx8G -Xms2G"
sbt "++ 2.12.18 service/test"

- name: Run service commons tests
run: |
export SBT_OPTS="-Xmx8G -Xms2G"
sbt "++ 2.12.18 service_commons/test"

- name: Run orchestrator tests
run: |
export SBT_OPTS="-Xmx8G -Xms2G"
sbt "++ 2.12.18 orchestration/test"



- name: Run cloud gcp tests
run: |
export SBT_OPTS="-Xmx8G -Xms2G"
sbt "++ 2.12.18 cloud_gcp/test"

- name: Run cloud aws tests
run: |
export SBT_OPTS="-Xmx8G -Xms2G"
sbt "++ 2.12.18 cloud_aws/test"
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ import com.google.cloud.bigtable.data.v2.BigtableDataSettings
import com.google.cloud.bigtable.data.v2.models.Query
import com.google.cloud.bigtable.data.v2.models.Row
import com.google.cloud.bigtable.data.v2.models.RowMutation
import com.google.cloud.bigtable.emulator.v2.BigtableEmulatorRule
import org.junit.Rule
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
import com.google.cloud.bigtable.emulator.v2.Emulator
import org.mockito.ArgumentMatchers.any
import org.mockito.Mockito.when
import org.mockito.Mockito.withSettings
Expand All @@ -33,33 +30,30 @@ import scala.concurrent.Await
import scala.concurrent.duration.DurationInt
import scala.jdk.CollectionConverters._

@RunWith(classOf[JUnit4])
class BigTableKVStoreTest extends AnyFlatSpec with BeforeAndAfter{
class BigTableKVStoreTest extends AnyFlatSpec with BeforeAndAfter {

import BigTableKVStore._

// ugly hacks to wire up the emulator. See: https://stackoverflow.com/questions/32160549/using-junit-rule-with-scalatest-e-g-temporaryfolder
val _bigtableEmulator: BigtableEmulatorRule = BigtableEmulatorRule.create()
@Rule
def bigtableEmulator: BigtableEmulatorRule = _bigtableEmulator

private var emulator: Emulator = _
private var dataClient: BigtableDataClient = _
private var adminClient: BigtableTableAdminClient = _

private val projectId = "test-project"
private val instanceId = "test-instance"

before {
emulator = Emulator.createBundled
emulator.start()
// Configure settings to use emulator
val dataSettings = BigtableDataSettings
.newBuilderForEmulator(bigtableEmulator.getPort)
.newBuilderForEmulator(emulator.getPort)
.setProjectId(projectId)
.setInstanceId(instanceId)
.setCredentialsProvider(NoCredentialsProvider.create())
.build()

val adminSettings = BigtableTableAdminSettings
.newBuilderForEmulator(bigtableEmulator.getPort)
.newBuilderForEmulator(emulator.getPort)
.setProjectId(projectId)
.setInstanceId(instanceId)
.setCredentialsProvider(NoCredentialsProvider.create())
Expand Down
Loading