-
-
Notifications
You must be signed in to change notification settings - Fork 448
129 lines (112 loc) · 3.11 KB
/
pipeline.yaml
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
name: pipeline
on:
workflow_call:
inputs:
# REQUIRED ============================
version:
required: true
type: string
# OPTIONAL ============================
bake-convention:
required: false
default: 'default'
type: string
bake-version:
required: false
type: string
default: '0.30.43-beta'
environment:
required: false
type: string
default: 'develop'
secrets:
nuget-api-key:
required: false
jobs:
build:
runs-on:
- ubuntu-20.04
environment:
name: ${{ inputs.environment }}
env:
HELPZ_POSTGRESQL_PASS: Password12!
EVENTFLOW_MSSQL_SERVER: 127.0.0.1,1433
EVENTFLOW_MSSQL_USER: sa
EVENTFLOW_MSSQL_PASS: Password12!
NUGET_APIKEY: ${{ secrets.nuget-api-key }}
services:
rabbitmq:
image: rabbitmq:3-management-alpine
env:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
ports:
- 5672:5672
- 15672:15672
eventstore:
image: eventstore/eventstore:release-4.1.3
ports:
- "1113:1113"
- "2113:2113"
postgres:
image: postgres:10
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: Password12!
ports:
- "5432:5432"
mssql:
image: mcr.microsoft.com/mssql/server:2017-latest
env:
ACCEPT_EULA: Y
SA_PASSWORD: Password12!
ports:
- "1433:1433"
steps:
- name: Configure sysctl limits for Elasticsearch
run: |
sudo swapoff -a
sudo sysctl -w vm.swappiness=1
sudo sysctl -w fs.file-max=262144
sudo sysctl -w vm.max_map_count=262144
- name: Run Elasticsearch
uses: elastic/elastic-github-actions/elasticsearch@master
with:
stack-version: 6.8.3
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
3.1.x
6.0.x
8.0.x
# Yes, EventFlow has a custom built build tool. If you are reading this
# you might have a better idea of how to do it alternatively, if so,
# create a PR for EventFlow.
# https://github.com/rasmus/Bake
- name: Install Bake
run: dotnet tool install -g --version ${{ inputs.bake-version }} Bake
- name: Run Bake
env:
MKDOCS_GIT_COMMITTERS_APIKEY: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
bake run \
--convention=${{ inputs.bake-convention }} \
--build-version ${{ inputs.version }} \
--destination="nuget>github,nuget,release>github"
- name: Upload NuGet packages
uses: actions/upload-artifact@v4
if: success()
with:
name: packages
path: "**/*nupkg"
if-no-files-found: error
- name: Upload test results
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-results
path: "**/*.trx"
if-no-files-found: error