Skip to content

Update noda_time_acceptance.cs #3

Update noda_time_acceptance.cs

Update noda_time_acceptance.cs #3

name: build_net6.0 pg15 Json.NET
on:
push:
branches:
- master
paths-ignore:
- 'documentation/**'
- 'docs/**'
- 'azure-pipelines.yml'
pull_request:
branches:
- master
paths-ignore:
- 'documentation/**'
- 'docs/**'
- 'azure-pipelines.yml'
env:
config: Release
disable_test_parallelization: true
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
node_version: 16.x
pg_db: marten_testing
pg_user: postgres
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
steps:
- uses: actions/checkout@v4
- name: Install .NET 6.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Install .NET 7.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Install .NET 8.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ env.node_version }}
- 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: Build
env:
DEFAULT_SERIALIZER: "Newtonsoft"
marten_testing_database: "Host=localhost;Port=5432;Database=${{ env.pg_db }};Username=${{ env.pg_user }}"
run: dotnet run --project build/build.csproj -f net6.0 -c Release -- ci
shell: bash
- name: Test Extensions
env:
DEFAULT_SERIALIZER: "Newtonsoft"
marten_testing_database: "Host=localhost;Port=5432;Database=${{ env.pg_db }};Username=${{ env.pg_user }}"
run: dotnet run --project build/build.csproj -f net6.0 -c Release -- test-extension-libs-without-plv8
shell: bash