Skip to content

Bump actions/setup-dotnet from 3 to 4 (#339) #27

Bump actions/setup-dotnet from 3 to 4 (#339)

Bump actions/setup-dotnet from 3 to 4 (#339) #27

Workflow file for this run

name: Build and Test Solutions
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
unit: ['unit-0', 'unit-1']
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: './global.json'
- name: Set Project Path
id: set-path
run: |
if [ "${{ matrix.unit }}" == "unit-0" ]; then
echo "project_path=${{ matrix.unit }}/completed/AkkaWordCounter" >> $GITHUB_OUTPUT
else
echo "project_path=${{ matrix.unit }}/completed" >> $GITHUB_OUTPUT
fi
- name: Restore dependencies
working-directory: ${{ steps.set-path.outputs.project_path }}
run: dotnet restore
- name: Build
working-directory: ${{ steps.set-path.outputs.project_path }}
run: dotnet build -c Release --no-restore
- name: Test
working-directory: ${{ steps.set-path.outputs.project_path }}
run: dotnet test -c Release --no-build