updated github actions added testing action

This commit is contained in:
Mia Rose Winter 2024-04-24 16:34:31 +02:00
parent e6117d6b06
commit 933e0af42b
Signed by: miawinter
GPG key ID: 4B6F6A83178F595E

42
.github/workflows/testing.yml vendored Normal file
View file

@ -0,0 +1,42 @@
name: NUnit Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
TEST_PROJECT: Wave.Tests
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: [ '8.0.x' ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup dotnet ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet-version }}
- uses: actions/cache@v3
with:
path: ~/.nuget/packages
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-nuget
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build
- name: Test with the dotnet CLI
run: dotnet test ${{ env.TEST_PROJECT }}