Skip to content

Build: Upgrade actions to v4. Run tests on pr workflow. #105

Build: Upgrade actions to v4. Run tests on pr workflow.

Build: Upgrade actions to v4. Run tests on pr workflow. #105

Workflow file for this run

name: Build & Test PR
on:
pull_request:
branches: [ main ]
env:
PROJECT_NAME: Blazored.FluentValidation
NETCORE_VERSION: '8.0.x'
DOTNET_CONSOLE_ANSI_COLOR: true
#ref https://github.com/dotnet/command-line-api/issues/1710
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: true
TERM: xterm
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setting up .NET SDK ${{ env.NETCORE_VERSION }}...
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.NETCORE_VERSION }}
- name: Restoring packages...
run: dotnet restore
- name: Building project...
run: dotnet build --configuration Release --no-restore src/$PROJECT_NAME/$PROJECT_NAME.csproj
- name: Running tests...
run: dotnet test