boolean-uk / software-developer

0 stars 0 forks source link

Configure Github Actions to run the NUnit tests on PR #194

Closed Logi13 closed 7 months ago

Logi13 commented 1 year ago

This will run the NUnit Tests. Might be worth it to point to standard criteria only, running a specific test file

name: Standard Criteria

on:
  pull_request:
    branches: [ "master" ]

jobs:
  build:
    runs-on: windows-latest
    steps:
      # 1) Check out the source code so that the workflow can access it.
      - uses: actions/checkout@v2
      # 2) Set up the .NET CLI environment for the workflow to use.
      - name: Setup .NET
        uses: actions/setup-dotnet@v1
        with:
          dotnet-version: '7.0.x'
      # 3) Restore the dependencies and tools of a project or solution.
      - name: Install dependencies
        run: dotnet restore
      # 4) Build a project or solution and all of its dependencies.
      - name: Build
        run: dotnet build --configuration Release
      - name: Run NUnit tests
        # run: dotnet test --configuration Release --no-build --verbosity normal --filter ("TestCategory!=Integration") && ("Name=CoreTests")
        run: dotnet test --configuration Release --no-build --verbosity normal --filter "Name=CoreTests"