Workflows: Add workflow for running tests on push
All checks were successful
Test / Run tests (push) Successful in 1m39s
All checks were successful
Test / Run tests (push) Successful in 1m39s
This commit is contained in:
27
.gitea/workflows/test.yaml
Normal file
27
.gitea/workflows/test.yaml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
name: Test
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["**"]
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: Run tests
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Setup MSBuild
|
||||||
|
uses: microsoft/setup-msbuild@v1.1
|
||||||
|
- name: Setup NuGet
|
||||||
|
uses: nuget/setup-nuget@v1
|
||||||
|
- name: Restore NuGet packages
|
||||||
|
shell: powershell
|
||||||
|
run: $(& nuget restore Elwig.sln; $a=$lastexitcode) | findstr x*; exit $a
|
||||||
|
- name: Build Elwig
|
||||||
|
shell: powershell
|
||||||
|
run: $(& msbuild -verbosity:quiet Elwig/Elwig.csproj -property:Configuration=Debug; $a=$lastexitcode) | findstr x*; exit $a
|
||||||
|
- name: Build Tests
|
||||||
|
shell: powershell
|
||||||
|
run: $(& dotnet build Tests; $a=$lastexitcode) | findstr x*; exit $a
|
||||||
|
- name: Run Tests
|
||||||
|
shell: powershell
|
||||||
|
run: $(& dotnet test Tests; $a=$lastexitcode) | findstr x*; exit $a
|
Reference in New Issue
Block a user