proj ref #54
Workflow file for this run
This file contains 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: Spark Dotnet | |
on: | |
push: | |
branches: [ "feature/*" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
concurrency: | |
group: ${{ github.ref }} # Groups all runs of this workflow using the branch name | |
cancel-in-progress: true # Automatically cancels any previous run of the workflow that is not completed | |
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 | |
run: dotnet restore | |
- name: Build the project | |
working-directory: ./src | |
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-beta-${{ github.run_number }} | |
- name: Upload test results | |
uses: actions/upload-artifact@v2 | |
with: | |
name: NuGet-3.5.1-beta-${{ github.run_number }} | |
path: ./src/Spark.Connect.Dotnet/Spark.Connect.Dotnet/nupkgs/*.nupkg | |