Merge pull request #6608 from duplicati/feature/add-test-coverage
Record test coverage
This commit is contained in:
@@ -30,8 +30,17 @@ jobs:
|
||||
- name: Build Duplicati
|
||||
run: dotnet build --no-restore Duplicati.sln
|
||||
|
||||
- name: Run unit tests
|
||||
run: dotnet test --no-build --verbosity minimal --filter "Category!=Integration" Duplicati.sln
|
||||
- name: Run unit tests with coverage
|
||||
run: |
|
||||
mkdir -p "$GITHUB_WORKSPACE/TestResults/unit"
|
||||
dotnet test --no-build --verbosity minimal --filter "Category!=Integration" --collect:"XPlat Code Coverage" --results-directory "$GITHUB_WORKSPACE/TestResults/unit" Duplicati.sln
|
||||
|
||||
- name: Upload coverage reports to Codecov
|
||||
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
files: ${{ github.workspace }}/TestResults/integration/**/coverage.cobertura.xml
|
||||
flags: unittest,${{ matrix.os }}
|
||||
|
||||
integration_tests:
|
||||
name: Integration tests
|
||||
@@ -56,8 +65,17 @@ jobs:
|
||||
- name: Build Duplicati
|
||||
run: dotnet build --no-restore Duplicati.sln
|
||||
|
||||
- name: Run integration tests
|
||||
run: dotnet test --no-build --verbosity minimal --filter "Category=Integration" Duplicati.sln
|
||||
- name: Run integration tests with coverage
|
||||
run: |
|
||||
mkdir -p "$GITHUB_WORKSPACE/TestResults/integration"
|
||||
dotnet test --no-build --verbosity minimal --filter "Category=Integration" --collect:"XPlat Code Coverage" --results-directory "$GITHUB_WORKSPACE/TestResults/integration" Duplicati.sln
|
||||
|
||||
- name: Upload coverage reports to Codecov
|
||||
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
files: ${{ github.workspace }}/TestResults/integration/**/coverage.cobertura.xml
|
||||
flags: integration,${{ matrix.os }}
|
||||
|
||||
# Disabled, as a new test needs to be written for the new UI
|
||||
# selenium:
|
||||
|
||||
Reference in New Issue
Block a user