Skip to content

Commit b60cd90

Browse files
authored
Merge pull request #139 from EventTriangle/develop
Merge develop
2 parents 9d59480 + 0f9ad55 commit b60cd90

File tree

691 files changed

+38110
-292
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

691 files changed

+38110
-292
lines changed

.editorconfig

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# dotnet_diagnostic.CA1848.severity = none
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 4
8+
max_line_length = 120
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
end_of_line = lf
12+
13+
[*.yml]
14+
indent_size = 2
15+
16+
[*.yaml]
17+
indent_size = 2
18+
19+
[*.{cs,vb}]
20+
dotnet_diagnostic.CS1591.severity = none
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: 'Build and test'
2+
description: 'Build, test and drop artifact'
3+
inputs:
4+
backendCsprojPath:
5+
description: '<API-name>.Presentation.csproj path'
6+
required: true
7+
8+
integrationTestsProjectPath:
9+
description: 'Integration tests project path'
10+
required: false
11+
default: ''
12+
13+
unitTestsProjectPath:
14+
description: 'Unit tests project path'
15+
required: false
16+
default: ''
17+
18+
buildConfiguration:
19+
description: 'Build configuration (Release or Debug)'
20+
required: true
21+
22+
serviceName:
23+
description: 'Service name'
24+
required: true
25+
26+
creatingDatabase:
27+
description: 'Creating database in docker container'
28+
required: false
29+
default: 'false'
30+
31+
runs:
32+
using: "composite"
33+
34+
steps:
35+
- name: Install GitVersion
36+
uses: gittools/actions/gitversion/setup@v1.1.1
37+
with:
38+
versionSpec: '5.x'
39+
40+
- name: Determine Version
41+
uses: gittools/actions/gitversion/execute@v1.1.1
42+
43+
- name: Setup .NET 8.0 SDK
44+
uses: actions/setup-dotnet@v4
45+
with:
46+
dotnet-version: 8.0.x
47+
48+
- name: NuGet Cache
49+
uses: actions/cache@v4
50+
with:
51+
path: ${{ env.NUGET_PACKAGES }}
52+
key: ${{ runner.os }}.nuget.${{ hashFiles('**/*.csproj') }}
53+
54+
- name: Restore Nuget Packages
55+
run: dotnet restore --verbosity minimal
56+
shell: bash
57+
58+
- name: Build .NET Project
59+
run: |
60+
dotnet build --no-restore /p:ContinuousIntegrationBuild=true -c ${{ inputs.buildConfiguration }}
61+
shell: bash
62+
63+
- name: Run unit tests
64+
if: ${{ inputs.unitTestsProjectPath != '' }}
65+
run: |
66+
dotnet test ${{ inputs.unitTestsProjectPath }} -c ${{ inputs.buildConfiguration }} --no-build
67+
shell: bash
68+
69+
- name: Run integration tests
70+
if: ${{ inputs.integrationTestsProjectPath != '' }}
71+
run: |
72+
dotnet test ${{ inputs.integrationTestsProjectPath }} -c ${{ inputs.buildConfiguration }} --no-build
73+
shell: bash
74+
75+
- name: Publish .NET Project
76+
run: |
77+
dotnet publish "${{ inputs.backendCsprojPath }}" \
78+
-c "${{ inputs.buildConfiguration }}" \
79+
-p:Version="${{ env.GitVersion_SemVer }}" \
80+
-o "publish"
81+
shell: bash
82+
83+
# - name: Drop Artifact
84+
# uses: actions/upload-artifact@v3
85+
# with:
86+
# name: '${{ inputs.serviceName }}-${{ env.GITVERSION_FULLSEMVER }}'
87+
# path: 'publish'
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Angular Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- develop
8+
pull_request:
9+
branches: [ develop ]
10+
workflow_dispatch:
11+
12+
env:
13+
CI: false
14+
15+
jobs:
16+
angular-build:
17+
name: Angular Build
18+
runs-on: ${{ matrix.environment }}
19+
strategy:
20+
matrix:
21+
environment:
22+
- ubuntu-latest
23+
- windows-latest
24+
steps:
25+
- name: 'Checkout'
26+
uses: actions/checkout@v4
27+
28+
- name: 'Setup Node.js 18.x'
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: '18.x'
32+
cache: 'npm'
33+
cache-dependency-path: 'src/authorization/EventTriangle.Client/package-lock.json'
34+
35+
- name: 'Setup Typescript 4.9.5'
36+
run: npm install -g typescript@4.9.5
37+
38+
- name: 'Print current node version'
39+
run: node -v
40+
41+
- name: "Print current npm version"
42+
run: npm -v
43+
44+
- name: "Npm ci"
45+
working-directory: './src/authorization/EventTriangle.Client'
46+
run: npm ci
47+
48+
- name: 'Compile TS files'
49+
working-directory: './src/authorization/EventTriangle.Client'
50+
run: tsc -p tsconfig.json
51+
52+
- name: 'Npm run build'
53+
working-directory: './src/authorization/EventTriangle.Client'
54+
run: npm run build
55+
56+
# - name: 'Drop artifact'
57+
# uses: actions/upload-artifact@v3
58+
# with:
59+
# name: 'client-build-${{ matrix.environment }}'
60+
# path: './src/authorization/EventTriangle.Client/build'
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build And Test Auth API
2+
on:
3+
push:
4+
branches:
5+
- develop
6+
- main
7+
paths:
8+
- src/sender/EventTriangleAPI.Authorization.BusinessLogic/**
9+
- src/sender/EventTriangleAPI.Authorization.Presentation/**
10+
- src/shared/EventTriangleAPI.Shared.DTO/**
11+
- src/shared/EventTriangleAPI.Shared.Application/**
12+
- .github/**
13+
14+
pull_request:
15+
branches:
16+
- develop
17+
- main
18+
paths:
19+
- src/sender/EventTriangleAPI.Authorization.BusinessLogic/**
20+
- src/sender/EventTriangleAPI.Authorization.Presentation/**
21+
- src/shared/EventTriangleAPI.Shared.DTO/**
22+
- src/shared/EventTriangleAPI.Shared.Application/**
23+
- .github/**
24+
25+
workflow_dispatch:
26+
27+
jobs:
28+
build-and-test-dotnet:
29+
name: Auth Build
30+
runs-on: ubuntu-latest
31+
32+
env:
33+
NUGET_PACKAGES: ${{ github.workspace }}/.github/nuget-packages
34+
35+
steps:
36+
- name: Fetch Sources
37+
uses: actions/checkout@v4
38+
with:
39+
fetch-depth: 0
40+
41+
- name: Auth Build
42+
uses: ./.github/actions/build-and-test
43+
with:
44+
backendCsprojPath: "src/authorization/EventTriangleAPI.Authorization.Presentation/EventTriangleAPI.Authorization.Presentation.csproj"
45+
buildConfiguration: "Release"
46+
serviceName: "auth-api"
47+
unitTestsProjectPath: "src/authorization/EventTriangleAPI.Authorization.UnitTests"
48+
creatingDatabase: 'true'
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Docker compose build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- develop
8+
pull_request:
9+
branches: [ develop ]
10+
workflow_dispatch:
11+
12+
jobs:
13+
angular-build:
14+
name: Docker compose build
15+
runs-on: ${{ matrix.environment }}
16+
strategy:
17+
matrix:
18+
environment:
19+
- ubuntu-latest
20+
steps:
21+
- name: 'Checkout'
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Docker compose build
27+
run: |
28+
docker compose build
29+
30+
- name: Docker compose up
31+
run: |
32+
docker compose up -d
33+
env:
34+
EVENT_TRIANGLE_AD_CLIENT_SECRET: 'TEST_SECRET'
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Build And Test Consumer API
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- main
8+
paths:
9+
- src/consumer/EventTriangleAPI.Consumer.Application/**
10+
- src/consumer/EventTriangleAPI.Consumer.BusinessLogic/**
11+
- src/consumer/EventTriangleAPI.Consumer.Domain/**
12+
- src/consumer/EventTriangleAPI.Consumer.IntegrationTests/**
13+
- src/consumer/EventTriangleAPI.Consumer.Presentation/**
14+
- src/consumer/EventTriangleAPI.Consumer.UnitTests/**
15+
- .github/**
16+
17+
pull_request:
18+
branches:
19+
- develop
20+
- main
21+
paths:
22+
- src/consumer/EventTriangleAPI.Consumer.Application/**
23+
- src/consumer/EventTriangleAPI.Consumer.BusinessLogic/**
24+
- src/consumer/EventTriangleAPI.Consumer.Domain/**
25+
- src/consumer/EventTriangleAPI.Consumer.IntegrationTests/**
26+
- src/consumer/EventTriangleAPI.Consumer.Presentation/**
27+
- src/consumer/EventTriangleAPI.Consumer.UnitTests/**
28+
- src/shared/EventTriangleAPI.Shared.DTO/**
29+
- src/shared/EventTriangleAPI.Shared.Application/**
30+
- .github/**
31+
32+
workflow_dispatch:
33+
34+
jobs:
35+
build-and-test-dotnet:
36+
name: Consumer Build
37+
runs-on: ubuntu-latest
38+
39+
env:
40+
NUGET_PACKAGES: ${{ github.workspace }}/.github/nuget-packages
41+
42+
steps:
43+
- name: Fetch Sources
44+
uses: actions/checkout@v4
45+
with:
46+
fetch-depth: 0
47+
48+
- name: Consumer Build
49+
uses: ./.github/actions/build-and-test
50+
with:
51+
backendCsprojPath: "src/consumer/EventTriangleAPI.Consumer.Presentation/EventTriangleAPI.Consumer.Presentation.csproj"
52+
unitTestsProjectPath: "src/consumer/EventTriangleAPI.Consumer.UnitTests"
53+
integrationTestsProjectPath: "src/consumer/EventTriangleAPI.Consumer.IntegrationTests"
54+
buildConfiguration: "Release"
55+
serviceName: "consumer-api"
56+
creatingDatabase: "true"
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Build And Test Sender API
2+
on:
3+
push:
4+
branches:
5+
- develop
6+
- main
7+
paths:
8+
- src/sender/EventTriangleAPI.Sender.Application/**
9+
- src/sender/EventTriangleAPI.Sender.BusinessLogic/**
10+
- src/sender/EventTriangleAPI.Sender.Domain/**
11+
- src/sender/EventTriangleAPI.Sender.IntegrationTests/**
12+
- src/sender/EventTriangleAPI.Sender.Presentation/**
13+
- src/sender/EventTriangleAPI.Sender.UnitTests/**
14+
- .github/**
15+
16+
pull_request:
17+
branches:
18+
- develop
19+
- main
20+
paths:
21+
- src/sender/EventTriangleAPI.Sender.Application/**
22+
- src/sender/EventTriangleAPI.Sender.BusinessLogic/**
23+
- src/sender/EventTriangleAPI.Sender.Domain/**
24+
- src/sender/EventTriangleAPI.Sender.IntegrationTests/**
25+
- src/sender/EventTriangleAPI.Sender.Presentation/**
26+
- src/sender/EventTriangleAPI.Sender.UnitTests/**
27+
- src/shared/EventTriangleAPI.Shared.DTO/**
28+
- src/shared/EventTriangleAPI.Shared.Application/**
29+
- .github/**
30+
31+
workflow_dispatch:
32+
33+
jobs:
34+
build-and-test-dotnet:
35+
name: Sender Build
36+
runs-on: ubuntu-latest
37+
38+
env:
39+
NUGET_PACKAGES: ${{ github.workspace }}/.github/nuget-packages
40+
41+
steps:
42+
- name: Fetch Sources
43+
uses: actions/checkout@v4
44+
with:
45+
fetch-depth: 0
46+
47+
- name: Sender Build
48+
uses: ./.github/actions/build-and-test
49+
with:
50+
backendCsprojPath: "src/sender/EventTriangleAPI.Sender.Presentation/EventTriangleAPI.Sender.Presentation.csproj"
51+
unitTestsProjectPath: "src/sender/EventTriangleAPI.Sender.UnitTests"
52+
integrationTestsProjectPath: "src/sender/EventTriangleAPI.Sender.IntegrationTests"
53+
buildConfiguration: "Release"
54+
serviceName: "sender-api"
55+
creatingDatabase: "true"

0 commit comments

Comments
 (0)