Skip to content

Commit

Permalink
Removing windows from test matrix in CI/CD (too unstable in GitHub Ac…
Browse files Browse the repository at this point in the history
…tions)
  • Loading branch information
tsutomi committed Sep 2, 2024
1 parent dcae607 commit ead64dd
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ jobs:
fail-fast: true
matrix:
dotnet: [ '6.0.x', '7.0.x', '8.0.x' ]
os: [ ubuntu-latest, windows-latest ]

runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
Expand All @@ -28,34 +27,20 @@ jobs:
dotnet-version: ${{ matrix.dotnet }}

- name: Set the TFM in Ubuntu
if: startsWith(matrix.os, 'ubuntu')
run: |
VERSION=$(echo "${{ matrix.dotnet }}" | sed 's/[^0-9.]*//g')
VERSION=$(echo "${VERSION}" | sed 's/\.$//')
DOTNET_TFM="net${VERSION}"
echo "DOTNET_TFM=$DOTNET_TFM" >> $GITHUB_ENV
- name: Set the TFM in Windows
if: startsWith(matrix.os, 'windows')
run: |
$VERSION = "${{ matrix.dotnet }}".Substring(0, "${{ matrix.dotnet }}".LastIndexOf('.'))
$DOTNET_TFM = "net$VERSION"
echo "DOTNET_TFM=$DOTNET_TFM" | Out-File -FilePath $env:GITHUB_ENV -Append
- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --no-restore -c Release -f ${{ env.DOTNET_TFM }}

- name: Test (Ubuntu)
if: matrix.os == 'ubuntu-latest'
- name: Test
run: dotnet test --no-build --verbosity normal -c Release -f ${{ env.DOTNET_TFM }} /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[*.XUnit]*"

- name: Test (Windows)
if: matrix.os == 'windows-latest'
run: dotnet test --no-build --verbosity normal -c Release -f ${{ env.DOTNET_TFM }} --filter DB!=SQLServer /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[*.XUnit]*"


- name: Collect to Codecov
uses: codecov/codecov-action@v4
Expand Down

0 comments on commit ead64dd

Please sign in to comment.