Add xUnit tests #4547
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Continuous Integration | |
| on: | |
| push: | |
| branches: [develop] | |
| pull_request: | |
| branches: [develop] | |
| workflow_dispatch: | |
| workflow_call: | |
| jobs: | |
| build: | |
| name: Build | |
| uses: ./.github/workflows/build.yml | |
| test: | |
| name: Test | |
| needs: build | |
| strategy: | |
| matrix: | |
| os: [windows-latest, ubuntu-latest, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Restore dependencies | |
| run: dotnet restore tests/SourceGit.Tests/SourceGit.Tests.csproj | |
| - name: Build tests | |
| run: dotnet build tests/SourceGit.Tests/SourceGit.Tests.csproj -c Release --no-restore | |
| - name: Run tests | |
| run: dotnet test tests/SourceGit.Tests/SourceGit.Tests.csproj -c Release --no-build --verbosity normal | |
| version: | |
| name: Prepare version string | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.version.outputs.version }} | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v6 | |
| - name: Output version string | |
| id: version | |
| run: echo "version=$(cat VERSION)" >> "$GITHUB_OUTPUT" | |
| package: | |
| needs: [build, test, version] | |
| name: Package | |
| uses: ./.github/workflows/package.yml | |
| with: | |
| version: ${{ needs.version.outputs.version }} |