-
-
Notifications
You must be signed in to change notification settings - Fork 460
156 lines (131 loc) · 4 KB
/
on-push-do-ci-build-pg15-jsonnet.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
name: build_net8.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:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
node_version: 16.x
pg_db: marten_testing
pg_user: postgres
CONFIGURATION: Release
FRAMEWORK: net8.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@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 .NET Aspire workload
run: |
dotnet workload update
dotnet workload install aspire
- 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: compile
run: ./build.sh compile
shell: bash
- name: mocha
if: ${{ success() || failure() }}
run: ./build.sh mocha
shell: bash
- name: test-base-lib
if: ${{ success() || failure() }}
run: ./build.sh test-base-lib
shell: bash
- name: test-core
if: ${{ success() || failure() }}
run: ./build.sh test-core
shell: bash
- name: test-document-db
if: ${{ success() || failure() }}
run: ./build.sh test-document-db
shell: bash
- name: test-event-sourcing
if: ${{ success() || failure() }}
run: ./build.sh test-event-sourcing
shell: bash
- name: test-cli
if: ${{ success() || failure() }}
run: ./build.sh test-cli
shell: bash
- name: test-linq
if: ${{ success() || failure() }}
run: ./build.sh test-linq
shell: bash
# - name: test-multi-tenancy
# if: ${{ success() || failure() }}
# run: ./build.sh test-multi-tenancy
# shell: bash
- name: test-patching
if: ${{ success() || failure() }}
run: ./build.sh test-patching
shell: bash
- name: test-value-types
if: ${{ success() || failure() }}
run: ./build.sh test-value-types
shell: bash
- name: test-code-gen
if: ${{ success() || failure() }}
run: ./build.sh test-code-gen
shell: bash
- name: test-noda-time
if: ${{ success() || failure() }}
run: ./build.sh test-noda-time
shell: bash
- name: test-aspnet-core
if: ${{ success() || failure() }}
run: ./build.sh test-aspnet-core
shell: bash