Skip to content

Commit

Permalink
Run tests before build & exit the workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
EwyBoy committed Jan 5, 2024
1 parent 76b1da7 commit e34acc3
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/build_spacewarp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,18 @@ jobs:
run: |
sudo curl -o /usr/local/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
- name: Running automated tests
run: |
dotnet test "SpaceWarp.sln"
test_exit_code=$?
if [ $test_exit_code -ne 0 ]; then
echo "Tests failed. Cancelling the build."
exit $test_exit_code
fi
- name: Build the solution
run: dotnet build "SpaceWarp.sln" -c Release

- name: Run automated tests
run: dotnet test "SpaceWarp.sln"

- name: Find zip
id: find-zip
run: |
Expand Down

0 comments on commit e34acc3

Please sign in to comment.