File tree Expand file tree Collapse file tree 1 file changed +26
-7
lines changed
Expand file tree Collapse file tree 1 file changed +26
-7
lines changed Original file line number Diff line number Diff line change 88 workflow_dispatch :
99
1010jobs :
11+ test :
12+ name : Run Tests
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v4
17+ with :
18+ fetch-depth : 0 # Fetch full git history for commit hash
19+
20+ - name : Setup .NET
21+ uses : actions/setup-dotnet@v4
22+ with :
23+ dotnet-version : ' 8.0.x'
24+
25+ - name : Get Git Commit Hash
26+ id : git
27+ run : echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
28+
29+ - name : Test
30+ run : |
31+ # Just run tests - dotnet test will build both projects as needed
32+ # The test project depends on the main project, so both get built correctly
33+ dotnet test tests/InstDotNet.Tests.csproj -c Release -p:GitCommitHash=${{ steps.git.outputs.hash }} --verbosity normal
34+ continue-on-error : false
35+
1136 build :
1237 name : Build Native Binaries
38+ needs : test
1339 runs-on : ubuntu-latest
1440 strategy :
1541 matrix :
3561 # Clean obj and bin directories to ensure each architecture build starts fresh
3662 # This prevents issues with shared obj directory between different runtime builds
3763 rm -rf obj bin publish
38-
39- - name : Test
40- run : |
41- # Just run tests - dotnet test will build both projects as needed
42- # The test project depends on the main project, so both get built correctly
43- dotnet test tests/InstDotNet.Tests.csproj -c Release -p:GitCommitHash=${{ steps.git.outputs.hash }} --verbosity normal
44- continue-on-error : false
4564
4665 - name : Publish Release for ${{ matrix.runtime }}
4766 run : dotnet publish src/InstDotNet.csproj -c Release -r ${{ matrix.runtime }} --self-contained false -o ./publish/${{ matrix.runtime }} -p:GitCommitHash=${{ steps.git.outputs.hash }}
You can’t perform that action at this time.
0 commit comments