Skip to content

Commit

Permalink
SNOW-1663768 Enable FIPS Tests (#162)
Browse files Browse the repository at this point in the history
* add FIPS test

* fix test
  • Loading branch information
sfc-gh-bli authored Sep 20, 2024
1 parent ec57f70 commit e419b1c
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/precommit-fips.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: precommit test - FIPS
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@v1
with:
java-version: 1.8
- name: Decrypt profile.properties
run: .github/scripts/decrypt_profile.sh
env:
PROFILE_PASSWORD: ${{ secrets.PROFILE_PASSWORD }}
- name: Run test
run: export SNOWPARK_FIPS=true;sbt "testOnly com.snowflake.snowpark_test.SessionSuite" -J-DFIPS_TEST=true
12 changes: 10 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
import scala.util.Properties

lazy val isFipsRelease = {
val result = sys.env.get("SNOWPARK_FIPS").getOrElse("false").toBoolean
println(s"FIPS Build: $result")
result
}
lazy val snowparkName = s"snowpark${if(isFipsRelease) "-fips" else ""}"
lazy val jdbcName = s"snowflake-jdbc${if(isFipsRelease) "-fips" else ""}"

val jacksonVersion = "2.17.2"
val openTelemetryVersion = "1.41.0"
val slf4jVersion = "2.0.4"
Expand All @@ -14,7 +22,7 @@ lazy val root = (project in file("."))
.configs(UDTFTests)
.configs(SprocTests)
.settings(
name := "snowpark",
name := snowparkName,
version := "1.15.0-SNAPSHOT",
scalaVersion := sys.props.getOrElse("SCALA_VERSION", default = "2.12.18"),
organization := "com.snowflake",
Expand All @@ -38,7 +46,7 @@ lazy val root = (project in file("."))
"org.slf4j" % "slf4j-simple" % slf4jVersion,
"commons-codec" % "commons-codec" % "1.17.0",
"io.opentelemetry" % "opentelemetry-api" % openTelemetryVersion,
"net.snowflake" % "snowflake-jdbc" % "3.17.0",
"net.snowflake" % jdbcName % "3.17.0",
"com.github.vertical-blank" % "sql-formatter" % "1.0.2",
"com.fasterxml.jackson.core" % "jackson-databind" % jacksonVersion,
"com.fasterxml.jackson.core" % "jackson-core" % jacksonVersion,
Expand Down

0 comments on commit e419b1c

Please sign in to comment.