4.4.2 Unshaded Release #3127
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Name of the GitHub Actions workflow | |
| name: Snowpipe Java SDK | |
| # Controls when the workflow will run | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ '**' ] | |
| jobs: | |
| # Job for building and testing on Ubuntu | |
| build: | |
| name: Build & Test - JDK ${{ matrix.java }}, Cloud ${{ matrix.snowflake_cloud }} | |
| # Use a stable LTS version of Ubuntu runner | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| # Don't cancel other jobs in the matrix if one fails | |
| fail-fast: false | |
| matrix: | |
| java: [ 8 ] | |
| snowflake_cloud: [ 'AWS', 'AZURE', 'GCP' ] | |
| steps: | |
| # Use the latest stable version of the checkout action (v4) | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| # Use the latest stable version of the setup-java action (v4) | |
| - name: Install Java ${{ matrix.java }} | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: ${{ matrix.java }} | |
| # Enable caching of Maven dependencies to speed up builds | |
| cache: 'maven' | |
| cache-dependency-path: '**/pom.xml' | |
| - name: Decrypt profile.json for Cloud ${{ matrix.snowflake_cloud }} | |
| env: | |
| DECRYPTION_PASSPHRASE: ${{ secrets.PROFILE_JSON_DECRYPT_PASSPHRASE }} | |
| run: | | |
| ./scripts/decrypt_secret.sh ${{ matrix.snowflake_cloud }} | |
| - name: Unit & Integration Test against Cloud ${{ matrix.snowflake_cloud }} | |
| env: | |
| JACOCO_COVERAGE: true | |
| WHITESOURCE_API_KEY: ${{ secrets.WHITESOURCE_API_KEY }} | |
| continue-on-error: false | |
| run: | | |
| ./scripts/run_gh_actions.sh -Dfailsafe.excludedGroups="net.snowflake.ingest.IcebergIT" | |
| # Use the latest stable version of the codecov action (v4) | |
| - name: Code Coverage | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| # Job for building and testing on Windows | |
| build-windows: | |
| name: Build & Test - Windows, JDK ${{ matrix.java }}, Cloud ${{ matrix.snowflake_cloud }} | |
| runs-on: windows-2022 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| java: [ 8 ] | |
| snowflake_cloud: [ 'AWS', 'AZURE', 'GCP' ] | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Install Java ${{ matrix.java }} | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: ${{ matrix.java }} | |
| cache: 'maven' | |
| cache-dependency-path: '**/pom.xml' | |
| - name: Decrypt profile.json for Cloud ${{ matrix.snowflake_cloud }} on Windows Powershell | |
| env: | |
| DECRYPTION_PASSPHRASE: ${{ secrets.PROFILE_JSON_DECRYPT_PASSPHRASE }} | |
| shell: pwsh | |
| run: | | |
| ./scripts/decrypt_secret_windows.ps1 -SnowflakeDeployment '${{ matrix.snowflake_cloud }}' | |
| - name: Unit & Integration Test (Windows) | |
| continue-on-error: false | |
| run: | | |
| mvn -DghActionsIT -Dnot-shadeDep -D"failsafe.excludedGroups"="net.snowflake.ingest.IcebergIT" verify --batch-mode | |
| # Job for building and testing Iceberg functionality on Ubuntu | |
| build-iceberg: | |
| name: Build & Test Streaming Iceberg - JDK ${{ matrix.java }}, Cloud ${{ matrix.snowflake_cloud }} | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| java: [ 8 ] | |
| snowflake_cloud: [ 'AWS', 'AZURE' ] | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Install Java ${{ matrix.java }} | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: ${{ matrix.java }} | |
| cache: 'maven' | |
| cache-dependency-path: '**/pom.xml' | |
| - name: Decrypt profile.json for Cloud ${{ matrix.snowflake_cloud }} | |
| env: | |
| DECRYPTION_PASSPHRASE: ${{ secrets.PROFILE_JSON_DECRYPT_PASSPHRASE }} | |
| run: | | |
| ./scripts/decrypt_secret.sh ${{ matrix.snowflake_cloud }} | |
| - name: Unit & Integration Test against Cloud ${{ matrix.snowflake_cloud }} | |
| env: | |
| JACOCO_COVERAGE: true | |
| WHITESOURCE_API_KEY: ${{ secrets.WHITESOURCE_API_KEY }} | |
| continue-on-error: false | |
| run: | | |
| ./scripts/run_gh_actions.sh -Dfailsafe.groups="net.snowflake.ingest.IcebergIT" | |
| - name: Code Coverage | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| # Job for building and testing Iceberg functionality on Windows | |
| build-iceberg-windows: | |
| name: Build & Test - Streaming Iceberg Windows, JDK ${{ matrix.java }}, Cloud ${{ matrix.snowflake_cloud }} | |
| runs-on: windows-2022 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| java: [ 8 ] | |
| snowflake_cloud: [ 'AWS', 'AZURE' ] | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Install Java ${{ matrix.java }} | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: ${{ matrix.java }} | |
| cache: 'maven' | |
| cache-dependency-path: '**/pom.xml' | |
| - name: Decrypt profile.json for Cloud ${{ matrix.snowflake_cloud }} on Windows Powershell | |
| env: | |
| DECRYPTION_PASSPHRASE: ${{ secrets.PROFILE_JSON_DECRYPT_PASSPHRASE }} | |
| shell: pwsh | |
| run: | | |
| ./scripts/decrypt_secret_windows.ps1 -SnowflakeDeployment '${{ matrix.snowflake_cloud }}' | |
| - name: Unit & Integration Test (Windows) | |
| continue-on-error: false | |
| run: | | |
| mvn -DghActionsIT -Dnot-shadeDep -"Dfailsafe.groups"="net.snowflake.ingest.IcebergIT" verify --batch-mode | |
| # Job for end-to-end testing with different JAR types and Java versions | |
| build-e2e-jar-test: | |
| name: e2e-jar-test cloud=${{ matrix.snowflake_cloud }} test_type=${{ matrix.test_type }} java=${{ matrix.java_path_env_var }} | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| snowflake_cloud: [ 'AWS', 'AZURE', 'GCP' ] | |
| test_type: [ 'shaded', 'unshaded', 'fips' ] | |
| java_path_env_var: [ "JAVA_HOME_8_X64", "JAVA_HOME_11_X64", "JAVA_HOME_17_X64", "JAVA_HOME_21_X64" ] | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Install Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| # Install all required LTS java versions | |
| java-version: | | |
| 21 | |
| 17 | |
| 11 | |
| 8 | |
| cache: 'maven' | |
| cache-dependency-path: '**/pom.xml' | |
| - name: Decrypt profile.json for Cloud ${{ matrix.snowflake_cloud }} | |
| env: | |
| DECRYPTION_PASSPHRASE: ${{ secrets.PROFILE_JSON_DECRYPT_PASSPHRASE }} | |
| run: ./scripts/decrypt_secret.sh ${{ matrix.snowflake_cloud }} | |
| - name: Run E2E JAR Test | |
| env: | |
| test_type: ${{ matrix.test_type }} | |
| java_path_env_var: ${{ matrix.java_path_env_var }} | |
| run: ./e2e-jar-test/run_e2e_jar_test.sh |