diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index d0bd7c6bd..ae21d9a8c 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -36,6 +36,7 @@ jobs:
matrix:
dotnet: ['net6.0', 'net472', 'net471']
cloud_env: ['AZURE', 'GCP', 'AWS']
+ pkg_version: ['current', 'latest']
steps:
- name: Checkout code
uses: actions/checkout@v3
@@ -57,35 +58,46 @@ jobs:
run: |
gpg --quiet --batch --yes --decrypt --passphrase="$PARAMETER_SECRET" \
./.github/workflows/parameters/parameters_${{ matrix.cloud_env }}.json.gpg > Snowflake.Data.Tests/parameters.json
- - name: Build Driver
+ - name: Build Driver Current
+ if: ${{ matrix.pkg_version == 'current' }}
run: |
cd Snowflake.Data.Tests
dotnet restore
dotnet build -f ${{ matrix.dotnet }}
+ - name: Build Driver Latest
+ if: ${{ matrix.pkg_version == 'latest' }}
+ run: |
+ cd Snowflake.Data.Tests
+ dotnet add ./../Snowflake.Data/Snowflake.Data.csproj package AWSSDK.S3
+ dotnet add ./../Snowflake.Data/Snowflake.Data.csproj package Google.Cloud.Storage.V1
+ dotnet add ./../Snowflake.Data/Snowflake.Data.csproj package Azure.Storage.Blobs
+ dotnet restore
+ dotnet build -f ${{ matrix.dotnet }}
- name: Run Tests
run: |
cd Snowflake.Data.Tests
- dotnet-coverage collect "dotnet test --framework ${{ matrix.dotnet }} --no-build -l console;verbosity=normal" --output windows_${{ matrix.dotnet }}_${{ matrix.cloud_env }}_coverage.xml --output-format cobertura --settings coverage.config
+ dotnet-coverage collect "dotnet test --framework ${{ matrix.dotnet }} --no-build -l console;verbosity=normal" --output windows_${{ matrix.dotnet }}_${{ matrix.cloud_env }}_${{ matrix.pkg_version }}_coverage.xml --output-format cobertura --settings coverage.config
env:
snowflake_cloud_env: ${{ matrix.cloud_env }}
+ pkg_version: ${{ matrix.pkg_version }}
net_version: ${{ matrix.dotnet }}
- name: Upload Code Coverage Report
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
- path: Snowflake.Data.Tests\windows_${{ matrix.dotnet }}_${{ matrix.cloud_env }}_coverage.xml
+ path: Snowflake.Data.Tests\windows_${{ matrix.dotnet }}_${{ matrix.cloud_env }}_${{ matrix.pkg_version }}_coverage.xml
- name: Upload Test Performance Report
uses: actions/upload-artifact@v3
with:
name: tests-performance
- path: Snowflake.Data.Tests\windows_${{ matrix.dotnet }}_${{ matrix.cloud_env }}_performance.csv
+ path: Snowflake.Data.Tests\windows_${{ matrix.dotnet }}_${{ matrix.cloud_env }}_${{ matrix.pkg_version }}_performance.csv
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
# without the token code cov may fail because of Github limits https://github.com/codecov/codecov-action/issues/557
token: ${{ secrets.CODE_COV_UPLOAD_TOKEN }}
fail_ci_if_error: true
- files: Snowflake.Data.Tests\windows_${{ matrix.dotnet }}_${{ matrix.cloud_env }}_coverage.xml
+ files: Snowflake.Data.Tests\windows_${{ matrix.dotnet }}_${{ matrix.cloud_env }}_${{ matrix.pkg_version }}_coverage.xml
test-linux:
name: Tests on Linux
@@ -95,6 +107,7 @@ jobs:
matrix:
dotnet: ['net6.0']
cloud_env: ['AZURE', 'GCP', 'AWS']
+ pkg_version: ['current', 'latest']
steps:
- uses: actions/checkout@v3
- name: Setup Dotnet
@@ -115,34 +128,46 @@ jobs:
run: |
gpg --quiet --batch --yes --decrypt --passphrase="$PARAMETER_SECRET" \
./.github/workflows/parameters/parameters_${{ matrix.cloud_env }}.json.gpg > Snowflake.Data.Tests/parameters.json
- - name: Build Driver
+ - name: Build Driver Current
+ if: ${{ matrix.pkg_version == 'current' }}
+ run: |
+ cd Snowflake.Data.Tests
+ dotnet restore
+ dotnet build -f ${{ matrix.dotnet }}
+ - name: Build Driver Latest
+ if: ${{ matrix.pkg_version == 'latest' }}
run: |
+ cd Snowflake.Data.Tests
+ dotnet add ./../Snowflake.Data/Snowflake.Data.csproj package AWSSDK.S3
+ dotnet add ./../Snowflake.Data/Snowflake.Data.csproj package Google.Cloud.Storage.V1
+ dotnet add ./../Snowflake.Data/Snowflake.Data.csproj package Azure.Storage.Blobs
dotnet restore
- dotnet build
+ dotnet build -f ${{ matrix.dotnet }}
- name: Run Tests
run: |
cd Snowflake.Data.Tests
- dotnet-coverage collect "dotnet test --framework ${{ matrix.dotnet }} --no-build -l console;verbosity=normal" --output linux_${{ matrix.dotnet }}_${{ matrix.cloud_env }}_coverage.xml --output-format cobertura --settings coverage.config
+ dotnet-coverage collect "dotnet test --framework ${{ matrix.dotnet }} --no-build -l console;verbosity=normal" --output linux_${{ matrix.dotnet }}_${{ matrix.cloud_env }}_${{ matrix.pkg_version }}_coverage.xml --output-format cobertura --settings coverage.config
env:
snowflake_cloud_env: ${{ matrix.cloud_env }}
+ pkg_version: ${{ matrix.pkg_version }}
net_version: ${{ matrix.dotnet }}
- name: Upload Code Coverage Report
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
- path: Snowflake.Data.Tests/linux_${{ matrix.dotnet }}_${{ matrix.cloud_env }}_coverage.xml
+ path: Snowflake.Data.Tests/linux_${{ matrix.dotnet }}_${{ matrix.cloud_env }}_${{ matrix.pkg_version }}_coverage.xml
- name: Upload Test Performance Report
uses: actions/upload-artifact@v3
with:
name: tests-performance
- path: Snowflake.Data.Tests/linux_${{ matrix.dotnet }}_${{ matrix.cloud_env }}_performance.csv
+ path: Snowflake.Data.Tests/linux_${{ matrix.dotnet }}_${{ matrix.cloud_env }}_${{ matrix.pkg_version }}_performance.csv
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
# without the token code cov may fail because of Github limits https://github.com/codecov/codecov-action/issues/557
token: ${{ secrets.CODE_COV_UPLOAD_TOKEN }}
fail_ci_if_error: true
- files: Snowflake.Data.Tests/linux_${{ matrix.dotnet }}_${{ matrix.cloud_env }}_coverage.xml
+ files: Snowflake.Data.Tests/linux_${{ matrix.dotnet }}_${{ matrix.cloud_env }}_${{ matrix.pkg_version }}_coverage.xml
test-mac:
name: Tests on MAC
@@ -152,6 +177,7 @@ jobs:
matrix:
dotnet: ['net6.0']
cloud_env: ['AZURE', 'GCP', 'AWS']
+ pkg_version: ['current', 'latest']
steps:
- uses: actions/checkout@v3
- name: Setup Dotnet
@@ -172,31 +198,43 @@ jobs:
run: |
gpg --quiet --batch --yes --decrypt --passphrase="$PARAMETER_SECRET" \
./.github/workflows/parameters/parameters_${{ matrix.cloud_env }}.json.gpg > Snowflake.Data.Tests/parameters.json
- - name: Build Driver
+ - name: Build Driver Current
+ if: ${{ matrix.pkg_version == 'current' }}
+ run: |
+ cd Snowflake.Data.Tests
+ dotnet restore
+ dotnet build -f ${{ matrix.dotnet }}
+ - name: Build Driver Latest
+ if: ${{ matrix.pkg_version == 'latest' }}
run: |
+ cd Snowflake.Data.Tests
+ dotnet add ./../Snowflake.Data/Snowflake.Data.csproj package AWSSDK.S3
+ dotnet add ./../Snowflake.Data/Snowflake.Data.csproj package Google.Cloud.Storage.V1
+ dotnet add ./../Snowflake.Data/Snowflake.Data.csproj package Azure.Storage.Blobs
dotnet restore
- dotnet build
+ dotnet build -f ${{ matrix.dotnet }}
- name: Run Tests
run: |
cd Snowflake.Data.Tests
- dotnet-coverage collect "dotnet test --framework ${{ matrix.dotnet }} --no-build -l console;verbosity=normal" --output macos_${{ matrix.dotnet }}_${{ matrix.cloud_env }}_coverage.xml --output-format cobertura --settings coverage.config
+ dotnet-coverage collect "dotnet test --framework ${{ matrix.dotnet }} --no-build -l console;verbosity=normal" --output macos_${{ matrix.dotnet }}_${{ matrix.cloud_env }}_${{ matrix.pkg_version }}_coverage.xml --output-format cobertura --settings coverage.config
env:
snowflake_cloud_env: ${{ matrix.cloud_env }}
+ pkg_version: ${{ matrix.pkg_version }}
net_version: ${{ matrix.dotnet }}
- name: Upload Code Coverage Report
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
- path: Snowflake.Data.Tests/macos_${{ matrix.dotnet }}_${{ matrix.cloud_env }}_coverage.xml
+ path: Snowflake.Data.Tests/macos_${{ matrix.dotnet }}_${{ matrix.cloud_env }}_${{ matrix.pkg_version }}_coverage.xml
- name: Upload Test Performance Report
uses: actions/upload-artifact@v3
with:
name: tests-performance
- path: Snowflake.Data.Tests/macos_${{ matrix.dotnet }}_${{ matrix.cloud_env }}_performance.csv
+ path: Snowflake.Data.Tests/macos_${{ matrix.dotnet }}_${{ matrix.cloud_env }}_${{ matrix.pkg_version }}_performance.csv
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
# without the token code cov may fail because of Github limits https://github.com/codecov/codecov-action/issues/557
token: ${{ secrets.CODE_COV_UPLOAD_TOKEN }}
fail_ci_if_error: true
- files: Snowflake.Data.Tests/macos_${{ matrix.dotnet }}_${{ matrix.cloud_env }}_coverage.xml
+ files: Snowflake.Data.Tests/macos_${{ matrix.dotnet }}_${{ matrix.cloud_env }}_${{ matrix.pkg_version }}_coverage.xml
diff --git a/Snowflake.Data.Tests/SFBaseTest.cs b/Snowflake.Data.Tests/SFBaseTest.cs
index 6aacb94f9..ce1a9b91e 100755
--- a/Snowflake.Data.Tests/SFBaseTest.cs
+++ b/Snowflake.Data.Tests/SFBaseTest.cs
@@ -246,12 +246,13 @@ public void CreateTestTimeArtifact()
var dotnetVersion = Environment.GetEnvironmentVariable("net_version");
var cloudEnv = Environment.GetEnvironmentVariable("snowflake_cloud_env");
+ var pkgVersion = Environment.GetEnvironmentVariable("pkg_version");
var separator = Path.DirectorySeparatorChar;
// We have to go up 3 times as the working directory path looks as follows:
// Snowflake.Data.Tests/bin/debug/{.net_version}/
- File.WriteAllText($"..{separator}..{separator}..{separator}{GetOs()}_{dotnetVersion}_{cloudEnv}_performance.csv", resultText);
+ File.WriteAllText($"..{separator}..{separator}..{separator}{GetOs()}_{dotnetVersion}_{cloudEnv}_{pkgVersion}_performance.csv", resultText);
}
private static string s_connectionString => string.Format(ConnectionStringFmt,
diff --git a/Snowflake.Data/Snowflake.Data.csproj b/Snowflake.Data/Snowflake.Data.csproj
index 0621c5fb0..2ff69e17b 100644
--- a/Snowflake.Data/Snowflake.Data.csproj
+++ b/Snowflake.Data/Snowflake.Data.csproj
@@ -23,7 +23,6 @@
-