-
Notifications
You must be signed in to change notification settings - Fork 35
72 lines (71 loc) · 2.16 KB
/
ci.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
name: CI
on:
push:
branches:
- master
- release-*
pull_request:
workflow_dispatch:
env:
DOTNET_NOLOGO: true
defaults:
run:
shell: pwsh
jobs:
build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-2022
name: Windows
- os: ubuntu-22.04
name: Linux
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4.1.7
with:
fetch-depth: 0
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4.0.1
with:
dotnet-version: 8.0.x
- name: Build
run: dotnet build src --configuration Release
- name: Upload packages
if: matrix.name == 'Windows'
uses: actions/upload-artifact@v4.3.6
with:
name: NuGet packages
path: nugets/
retention-days: 7
- name: Install SQL Server
uses: Particular/install-sql-server-action@v1.2.0
with:
connection-string-env-var: SqlServerTransportConnectionString
catalog: nservicebus
- name: Prepare SQL Server
run: |
echo "Create extra databases"
sqlcmd -Q "CREATE DATABASE nservicebus1"
sqlcmd -Q "CREATE DATABASE nservicebus2"
echo "Create additional schemas"
sqlcmd -Q "CREATE SCHEMA receiver AUTHORIZATION db_owner" -d "nservicebus"
sqlcmd -Q "CREATE SCHEMA sender AUTHORIZATION db_owner" -d "nservicebus"
sqlcmd -Q "CREATE SCHEMA db@ AUTHORIZATION db_owner" -d "nservicebus"
- name: Azure login
uses: azure/login@v2.1.1
with:
creds: ${{ secrets.AZURE_ACI_CREDENTIALS }}
- name: Setup PostgreSql 15.x
uses: Particular/setup-postgres-action@v1.0.0
with:
connection-string-name: PostgreSqlTransportConnectionString
init-script: './.github/workflows/scripts/init-postgres.sql'
tag: SqlTransport
registry-username: ${{ secrets.DOCKERHUB_USERNAME }}
registry-password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Run tests
uses: Particular/run-tests-action@v1.7.0