Skip to content

Commit

Permalink
enable java udx test
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-bli committed Aug 21, 2024
1 parent 35cf533 commit 5a57e89
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/precommit-java-udx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: precommit test - Java UDX
on:
push:
branches: [ main ]
pull_request:
branches: '**'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8
- name: Decrypt profile.properties
run: .github/scripts/decrypt_profile.sh
env:
PROFILE_PASSWORD: ${{ secrets.PROFILE_PASSWORD }}
- name: Run test
run: sbt JavaUDXTests:test
9 changes: 9 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ val slf4jVersion = "2.0.4"
lazy val root = (project in file("."))
.configs(CodeVerificationTests)
.configs(JavaAPITests)
.configs(JavaUDXTests)
.settings(
name := "snowpark",
version := "1.15.0-SNAPSHOT",
Expand Down Expand Up @@ -52,11 +53,14 @@ lazy val root = (project in file("."))
// Test / crossPaths := false,
Test / fork := false,
// Test / javaOptions ++= Seq("-Xms1024M", "-Xmx4096M"),
Test / parallelExecution := false,
// Test Groups
inConfig(CodeVerificationTests)(Defaults.testTasks),
CodeVerificationTests / testOptions += Tests.Filter(isCodeVerification),
inConfig(JavaAPITests)(Defaults.testTasks),
JavaAPITests / testOptions += Tests.Filter(isJavaAPITests),
inConfig(JavaUDXTests)(Defaults.testTasks),
JavaUDXTests / testOptions += Tests.Filter(isJavaUDXTests),
// Release settings
// usePgpKeyHex(Properties.envOrElse("GPG_SIGNATURE", "12345")),
Global / pgpPassphrase := Properties.envOrNone("GPG_KEY_PASSPHRASE").map(_.toCharArray),
Expand Down Expand Up @@ -106,6 +110,11 @@ def isJavaAPITests(name: String): Boolean = {
}
lazy val JavaAPITests = config("JavaAPITests") extend Test
// Java UDx Tests
def isJavaUDXTests(name: String): Boolean = {
(name.startsWith("com.snowflake.snowpark_test.Java") &&
udxNames.exists(x => name.contains(x)))
}
lazy val JavaUDXTests = config("JavaUDXTests") extend Test
// Scala UDx Tests
// FIPS Tests

Expand Down

0 comments on commit 5a57e89

Please sign in to comment.