Skip to content

Commit 2107fc6

Browse files
committed
Add tests to ci.yml GH Action
1 parent 3414b5c commit 2107fc6

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,28 @@ jobs:
1010
build:
1111
name: Build
1212
uses: ./.github/workflows/build.yml
13+
test:
14+
name: Test
15+
needs: build
16+
strategy:
17+
matrix:
18+
os: [windows-latest, ubuntu-latest, macos-latest]
19+
runs-on: ${{ matrix.os }}
20+
steps:
21+
- name: Checkout sources
22+
uses: actions/checkout@v6
23+
with:
24+
submodules: true
25+
- name: Setup .NET
26+
uses: actions/setup-dotnet@v5
27+
with:
28+
dotnet-version: 10.0.x
29+
- name: Restore dependencies
30+
run: dotnet restore tests/SourceGit.Tests/SourceGit.Tests.csproj
31+
- name: Build tests
32+
run: dotnet build tests/SourceGit.Tests/SourceGit.Tests.csproj -c Release --no-restore
33+
- name: Run tests
34+
run: dotnet test tests/SourceGit.Tests/SourceGit.Tests.csproj -c Release --no-build --verbosity normal
1335
version:
1436
name: Prepare version string
1537
runs-on: ubuntu-latest
@@ -22,7 +44,7 @@ jobs:
2244
id: version
2345
run: echo "version=$(cat VERSION)" >> "$GITHUB_OUTPUT"
2446
package:
25-
needs: [build, version]
47+
needs: [build, test, version]
2648
name: Package
2749
uses: ./.github/workflows/package.yml
2850
with:

0 commit comments

Comments
 (0)