Skip to content

#4509: document FetchForWriting + inline-snapshot no-mutation contrac… #655

#4509: document FetchForWriting + inline-snapshot no-mutation contrac…

#4509: document FetchForWriting + inline-snapshot no-mutation contrac… #655

name: Build & Test - NET9 - PG15 - Newtonsoft - EventSourcing
on:
push:
branches:
- master
- "7.0"
paths-ignore:
- 'documentation/**'
- 'docs/**'
- 'azure-pipelines.yml'
pull_request:
branches:
- master
- "7.0"
paths-ignore:
- 'documentation/**'
- 'docs/**'
- 'azure-pipelines.yml'
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
pg_db: marten_testing
pg_user: postgres
CONFIGURATION: Release
FRAMEWORK: net9.0
DISABLE_TEST_PARALLELIZATION: true
DEFAULT_SERIALIZER: "Newtonsoft"
NUKE_TELEMETRY_OPTOUT: true
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 20
services:
postgres:
image: postgres:15-alpine
ports:
- 5432:5432
env:
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_DB: ${{ env.pg_db }}
NAMEDATALEN: 150
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
--user postgres
steps:
- uses: actions/checkout@v6
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
9.0.x
10.0.x
- name: Install .NET Aspire workload
run: |
dotnet workload update
dotnet workload install aspire
- name: Optimize database for running tests faster
run: |
PG_CONTAINER_NAME=$(docker ps --filter expose=5432/tcp --format {{.Names}})
docker exec $PG_CONTAINER_NAME bash -c "echo -e '\nfsync = off' >> /var/lib/postgresql/data/postgresql.conf"
docker exec $PG_CONTAINER_NAME bash -c "echo -e '\nfull_page_writes = off' >> /var/lib/postgresql/data/postgresql.conf"
docker exec $PG_CONTAINER_NAME bash -c "echo -e '\nsynchronous_commit = off' >> /var/lib/postgresql/data/postgresql.conf"
docker container restart $PG_CONTAINER_NAME
shell: bash
- name: compile
run: ./build.sh compile-project --project src/EventSourcingTests/EventSourcingTests.csproj
shell: bash
- name: test-event-sourcing
if: ${{ success() || failure() }}
run: ./build.sh test-event-sourcing
shell: bash
- name: test-modular-config
if: ${{ success() || failure() }}
run: ./build.sh test-modular-config
shell: bash