Skip to content

Fix culture-dependent DateTime formatting for cross-platform tests #38

Fix culture-dependent DateTime formatting for cross-platform tests

Fix culture-dependent DateTime formatting for cross-platform tests #38

Workflow file for this run

name: Build and Test
on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: 1
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
9.0.x
- name: Restore dependencies
run: dotnet restore SharpAssert.sln
- name: Build
run: dotnet build SharpAssert.sln --configuration Release --no-restore
- name: Run Unit and Integration Tests
run: dotnet test SharpAssert.sln --configuration Release --no-build --logger trx --collect:"XPlat Code Coverage"
- name: Create Local Package
run: |
chmod +x ./scripts/publish-local.sh
./scripts/publish-local.sh
- name: Test NuGet Packages (Isolated)
run: |
# Use isolated solution and cache
dotnet restore SharpAssert.PackageTesting.sln \
--packages ./ci-packages \
--configfile nuget.package-tests.config
dotnet build SharpAssert.PackageTesting.sln \
--packages ./ci-packages \
--no-restore \
--configuration Release
dotnet test SharpAssert.PackageTesting.sln \
--no-build \
--no-restore \
--configuration Release \
--logger trx
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: '**/*.trx'
- name: Upload coverage
uses: actions/upload-artifact@v4
if: always()
with:
name: coverage
path: '**/coverage.cobertura.xml'