mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
This commit is contained in:
113
.github/workflows/integration-tests.yml
vendored
113
.github/workflows/integration-tests.yml
vendored
@@ -1,5 +1,4 @@
|
||||
name: Build & Run Integration Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ v2_release, v2_develop ]
|
||||
@@ -9,57 +8,99 @@ on:
|
||||
branches: [ v2_release, v2_develop ]
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
|
||||
|
||||
jobs:
|
||||
# Call the build workflow to build the solution once
|
||||
build:
|
||||
uses: ./.github/workflows/build.yml
|
||||
uses: ./.github/workflows/quick-build.yml
|
||||
|
||||
integration_tests:
|
||||
name: Integration Tests
|
||||
runs-on: ${{ matrix.os }}
|
||||
needs: build
|
||||
strategy:
|
||||
# Turn off fail-fast to let all runners run even if there are errors
|
||||
fail-fast: true
|
||||
fail-fast: false # Let all OSes finish even if one fails
|
||||
matrix:
|
||||
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
||||
timeout-minutes: 15
|
||||
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup .NET Core
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 8.x
|
||||
dotnet-quality: ga
|
||||
|
||||
- name: Setup .NET Core
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 8.x
|
||||
dotnet-quality: 'ga'
|
||||
- name: Download build artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: test-build-artifacts
|
||||
path: .
|
||||
|
||||
- name: Download build artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: build-artifacts
|
||||
path: .
|
||||
- name: Restore NuGet packages
|
||||
run: dotnet restore
|
||||
|
||||
- name: Restore NuGet packages
|
||||
run: dotnet restore
|
||||
- name: Disable Windows Defender (Windows only)
|
||||
if: runner.os == 'Windows'
|
||||
shell: powershell
|
||||
run: |
|
||||
Add-MpPreference -ExclusionPath "${{ github.workspace }}"
|
||||
Add-MpPreference -ExclusionProcess "dotnet.exe"
|
||||
Add-MpPreference -ExclusionProcess "testhost.exe"
|
||||
Add-MpPreference -ExclusionProcess "VSTest.Console.exe"
|
||||
|
||||
- name: Set VSTEST_DUMP_PATH
|
||||
shell: bash
|
||||
run: echo "{VSTEST_DUMP_PATH}={logs/${{ runner.os }}/}" >> $GITHUB_ENV
|
||||
- name: Set VSTEST_DUMP_PATH
|
||||
shell: bash
|
||||
run: echo "VSTEST_DUMP_PATH=logs/IntegrationTests/${{ runner.os }}/" >> $GITHUB_ENV
|
||||
|
||||
- name: Run IntegrationTests
|
||||
run: |
|
||||
dotnet test Tests/IntegrationTests --no-build --verbosity normal --diag:logs/${{ runner.os }}/logs.txt --blame --blame-crash --blame-hang --blame-hang-timeout 60s --blame-crash-collect-always -- xunit.stopOnFail=true
|
||||
|
||||
- name: Upload Test Logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: integration-test-logs-${{ runner.os }}
|
||||
path: |
|
||||
logs/
|
||||
TestResults/IntegrationTests/
|
||||
- name: Run IntegrationTests
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${{ runner.os }}" == "Linux" ]; then
|
||||
# Run with coverage on Linux only
|
||||
dotnet test Tests/IntegrationTests \
|
||||
--no-build \
|
||||
--verbosity minimal \
|
||||
--collect:"XPlat Code Coverage" \
|
||||
--settings Tests/IntegrationTests/runsettings.coverage.xml \
|
||||
--diag:logs/IntegrationTests/${{ runner.os }}/logs.txt \
|
||||
--blame \
|
||||
--blame-crash \
|
||||
--blame-hang \
|
||||
--blame-hang-timeout 60s \
|
||||
--blame-crash-collect-always
|
||||
else
|
||||
# Run without coverage on Windows/macOS for speed
|
||||
dotnet test Tests/IntegrationTests \
|
||||
--no-build \
|
||||
--verbosity minimal \
|
||||
--settings Tests/IntegrationTests/runsettings.xml \
|
||||
--diag:logs/IntegrationTests/${{ runner.os }}/logs.txt \
|
||||
--blame \
|
||||
--blame-crash \
|
||||
--blame-hang \
|
||||
--blame-hang-timeout 60s \
|
||||
--blame-crash-collect-always
|
||||
fi
|
||||
|
||||
- name: Upload Integration Test Logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: integration_tests-logs-${{ runner.os }}
|
||||
path: |
|
||||
logs/IntegrationTests/
|
||||
TestResults/
|
||||
|
||||
- name: Upload Integration Tests Coverage to Codecov
|
||||
if: matrix.os == 'ubuntu-latest' && always()
|
||||
uses: codecov/codecov-action@v4
|
||||
with:
|
||||
files: TestResults/**/coverage.cobertura.xml
|
||||
flags: integrationtests
|
||||
name: IntegrationTests-${{ runner.os }}
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
fail_ci_if_error: false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user