Skip to content

wip

wip #43

Workflow file for this run

name: Spark Dotnet
on:
push:
branches: [ "feature/*", "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
strategy:
matrix:
configuration: [Release]
runs-on: ubuntu-latest
env:
Solution_Name: Spark.Connect.Dotnet # Replace with your solution name, i.e. MyWpfApp.sln.
Test_Project_Path: src/test # Replace with the path to your test project, i.e. MyWpfApp.Tests\MyWpfApp.Tests.csproj.
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '7.0' # Specify your .NET Core version here
- name: Print current directory
run: pwd
- name: Print current directory listing
run: ls -a ./src
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: actions/setup-java@v4
with:
java-version: '8'
distribution: temurin
- uses: vemonet/setup-spark@v1
with:
spark-version: '3.5.1'
hadoop-version: '3'
- run: $SPARK_HOME/sbin/stop-connect-server.sh --force
- run: $SPARK_HOME/sbin/start-connect-server.sh --packages org.apache.spark:spark-connect_2.12:3.5.1
- name: Install dependencies
working-directory: ./src/Spark.Connect.Dotnet/
run: dotnet restore
- name: Build the project
working-directory: ./src/Spark.Connect.Dotnet/
run: dotnet build --configuration Release --no-restore
# Execute all unit tests in the solution
- name: Execute unit tests
working-directory: ./src/test/Spark.Connect.Dotnet.Tests/
run: dotnet test -l:"console;verbosity=detailed" --logger "trx;LogFileName=./test_results.xml"
- name: Upload test results
uses: actions/upload-artifact@v2
with:
name: Test Results
path: ./test_results.xml
- name: Pack
working-directory: ./src/Spark.Connect.Dotnet/Spark.Connect.Dotnet/
run: dotnet pack --no-build --configuration Release --output nupkgs /p:PackageVersion=3.5.1-${{ github.run_number }}
- name: Upload test results
uses: actions/upload-artifact@v2
with:
name: NuGet-3.5.1-${{ github.run_number }}
path: ./src/Spark.Connect.Dotnet/Spark.Connect.Dotnet/nupkgs/*.nupkg
# Decode the base 64 encoded pfx and save the Signing_Certificate
# - name: Decode the pfx
# run: |
# $pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.Base64_Encoded_Pfx }}")
# $certificatePath = Join-Path -Path $env:Wap_Project_Directory -ChildPath GitHubActionsWorkflow.pfx
# [IO.File]::WriteAllBytes("$certificatePath", $pfx_cert_byte)
# # Remove the pfx
# - name: Remove the pfx
# run: Remove-Item -path $env:Wap_Project_Directory\GitHubActionsWorkflow.pfx
# Upload the MSIX package: https://github.com/marketplace/actions/upload-a-build-artifact
# - name: Upload build artifacts
# uses: actions/upload-artifact@v3
# with:
# name: MSIX Package
# path: ${{ env.Wap_Project_Directory }}\AppPackages