Skip to content

#43 Log swallowed TryGetAsync exceptions (#52) #91

#43 Log swallowed TryGetAsync exceptions (#52)

#43 Log swallowed TryGetAsync exceptions (#52) #91

Workflow file for this run

name: build
on:
push:
branches:
- "main"
paths:
- ".github/workflows/build.yml"
- "src/**"
- "test/**"
- "util/**"
- "dev/**"
- "Directory.Build.props"
- "Directory.Build.targets"
- "*.slnx"
- ".editorconfig"
pull_request:
branches:
- "main"
paths:
- ".github/workflows/build.yml"
- "src/**"
- "test/**"
- "util/**"
- "dev/**"
- "Directory.Build.props"
- "Directory.Build.targets"
- "*.slnx"
- ".editorconfig"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: read
actions: read
id-token: write
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
steps:
- name: CargoWall
uses: code-cargo/cargowall-action@c0bd989036354f795a5150d478fce5bd510586af # v1.3.2-rc.3
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Setup dotnet
uses: actions/setup-dotnet@26b0ec14cb23fa6904739307f278c14f94c95bf1 # v5.4.0
with:
cache: true
cache-dependency-path: '**/packages.linux-x64.lock.json'
dotnet-version: |
8.x
10.x
- name: Verify NuGet lock files are in sync
run: |
./dev/update-nuget-lockfiles.sh
changes="$(git status --porcelain -- '*.lock.json')"
if [ -n "$changes" ]; then
echo "::error::NuGet lock files are out of date. Run ./dev/update-nuget-lockfiles.sh and commit the result."
echo "$changes"
git diff -- '*.lock.json'
exit 1
fi
- name: Build
run: dotnet build -p TreatWarningsAsErrors=true
- name: Check for BOMs
run: ./dev/check-bom.sh
- name: Check formatting
run: |
if dotnet format --no-restore --verify-no-changes; then
echo "formatting passed"
else
rc="$?"
echo "formatting failed; run 'dotnet format'" >&2
exit "$rc"
fi
- name: Unit Tests
run: dotnet test --no-build test/UnitTests/UnitTests.csproj
- name: Integration Tests
run: dotnet test --no-build test/IntegrationTests/IntegrationTests.csproj