name: build

on:
  push:
    branches:
      - dev
    paths:
      - 'global.json'
      - '**/*.props'
      - '**/*.cs'
      - '**/*.cshtml'
      - '**/*.csproj'

  pull_request:
    branches:
      - dev
    paths:
      - 'global.json'
      - '**/*.props'
      - '**/*.cs'
      - '**/*.cshtml'
      - '**/*.csproj'

permissions:
  contents: read

jobs:
  build:

    runs-on: 'ubuntu-latest'
    timeout-minutes: 10
    
    steps:
    - uses: actions/checkout@v3
    - name: Setup .NET
      uses: actions/setup-dotnet@v3
    - name: Restore dependencies
      run: dotnet restore
    - name: Build
      run: dotnet build --no-restore
    - name: Test
      run: dotnet test --no-build --verbosity normal
