Skip to content

Commit 5f2e7e8

Browse files
authored
Merge pull request #73 from followynne/feat/ci-cd-with-nuke
feat(ci-cd): nuke setup
2 parents 810fbf9 + 049bfd6 commit 5f2e7e8

File tree

57 files changed

+1408
-196
lines changed

Some content is hidden

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

57 files changed

+1408
-196
lines changed

.github/workflows/DotNET-build.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# ------------------------------------------------------------------------------
2+
# <auto-generated>
3+
#
4+
# This code was generated.
5+
#
6+
# - To turn off auto-generation set:
7+
#
8+
# [CustomGithubActions (AutoGenerate = false)]
9+
#
10+
# - To trigger manual generation invoke:
11+
#
12+
# nuke --generate-configuration GitHubActions_DotNET-build --host GitHubActions
13+
#
14+
# </auto-generated>
15+
# ------------------------------------------------------------------------------
16+
17+
name: DotNET-build
18+
19+
on:
20+
push:
21+
branches:
22+
- master
23+
- dev
24+
pull_request:
25+
branches:
26+
- master
27+
- dev
28+
29+
jobs:
30+
ubuntu-latest:
31+
name: ubuntu-latest
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v3
35+
with:
36+
fetch-depth: 0
37+
- name: Cache .nuke/temp, ~/.nuget/packages
38+
uses: actions/cache@v3
39+
with:
40+
path: |
41+
.nuke/temp
42+
~/.nuget/packages
43+
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }}
44+
- name: Run './build.cmd Backend_SonarScan_End'
45+
run: ./build.cmd Backend_SonarScan_End
46+
env:
47+
SonarToken: ${{ secrets.SONAR_TOKEN }}
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
50+
- uses: phoenix-actions/test-reporting@v9
51+
if: always()
52+
with:
53+
name: DotNET - Tests
54+
output-to: checks
55+
path: '**/test-results.trx'
56+
reporter: dotnet-trx
57+
fail-on-error: false

.github/workflows/JS-build.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# ------------------------------------------------------------------------------
2+
# <auto-generated>
3+
#
4+
# This code was generated.
5+
#
6+
# - To turn off auto-generation set:
7+
#
8+
# [CustomGithubActions (AutoGenerate = false)]
9+
#
10+
# - To trigger manual generation invoke:
11+
#
12+
# nuke --generate-configuration GitHubActions_JS-build --host GitHubActions
13+
#
14+
# </auto-generated>
15+
# ------------------------------------------------------------------------------
16+
17+
name: JS-build
18+
19+
on:
20+
push:
21+
branches:
22+
- master
23+
- dev
24+
pull_request:
25+
branches:
26+
- master
27+
- dev
28+
29+
jobs:
30+
ubuntu-latest:
31+
name: ubuntu-latest
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v3
35+
with:
36+
fetch-depth: 0
37+
- name: Cache .nuke/temp, ~/.nuget/packages
38+
uses: actions/cache@v3
39+
with:
40+
path: |
41+
.nuke/temp
42+
~/.nuget/packages
43+
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }}
44+
- name: Run './build.cmd Frontend_Tests_Ci'
45+
run: ./build.cmd Frontend_Tests_Ci
46+
env:
47+
SonarTokenUi: ${{ secrets.SONAR_TOKEN_UI }}
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
50+
- name: SonarCloud run
51+
uses: SonarSource/sonarcloud-github-action@master
52+
if: ${{ false }}
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
55+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_UI }}
56+
with:
57+
args: >
58+
-Dsonar.organization=
59+
-Dsonar.projectKey=
60+
-Dsonar.sources=src/Serilog.Ui.Web/assets/
61+
-Dsonar.tests=src/Serilog.Ui.Web/assets/
62+
-Dsonar.exclusions=src/Serilog.Ui.Web/assets/__tests__/**/*
63+
-Dsonar.test.inclusions=src/Serilog.Ui.Web/assets/__tests__/**/*
64+
-Dsonar.javascript.lcov.reportPaths=./src/Serilog.Ui.Web/coverage/lcov.info
65+
66+
- uses: phoenix-actions/test-reporting@v9
67+
if: always()
68+
with:
69+
name: JS - Tests
70+
output-to: checks
71+
path: '**/jest-*.xml'
72+
reporter: jest-junit
73+
fail-on-error: false

.github/workflows/Release.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# ------------------------------------------------------------------------------
2+
# <auto-generated>
3+
#
4+
# This code was generated.
5+
#
6+
# - To turn off auto-generation set:
7+
#
8+
# [CustomGithubActions (AutoGenerate = false)]
9+
#
10+
# - To trigger manual generation invoke:
11+
#
12+
# nuke --generate-configuration GitHubActions_Release --host GitHubActions
13+
#
14+
# </auto-generated>
15+
# ------------------------------------------------------------------------------
16+
17+
name: Release
18+
19+
on:
20+
workflow_dispatch:
21+
inputs:
22+
ElasticProvider:
23+
description: "Elastic Provider"
24+
required: true
25+
MongoProvider:
26+
description: "Mongo Provider"
27+
required: true
28+
MsSqlProvider:
29+
description: "Ms Sql Provider"
30+
required: true
31+
MySqlProvider:
32+
description: "My Sql Provider"
33+
required: true
34+
PostgresProvider:
35+
description: "Postgres Provider"
36+
required: true
37+
Ui:
38+
description: "Ui"
39+
required: true
40+
41+
jobs:
42+
ubuntu-latest:
43+
name: ubuntu-latest
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v3
47+
with:
48+
fetch-depth: 0
49+
- name: Cache .nuke/temp, ~/.nuget/packages
50+
uses: actions/cache@v3
51+
with:
52+
path: |
53+
.nuke/temp
54+
~/.nuget/packages
55+
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }}
56+
- name: Run './build.cmd Publish'
57+
run: ./build.cmd Publish
58+
env:
59+
ElasticProvider: ${{ github.event.inputs.ElasticProvider }}
60+
MongoProvider: ${{ github.event.inputs.MongoProvider }}
61+
MsSqlProvider: ${{ github.event.inputs.MsSqlProvider }}
62+
MySqlProvider: ${{ github.event.inputs.MySqlProvider }}
63+
PostgresProvider: ${{ github.event.inputs.PostgresProvider }}
64+
Ui: ${{ github.event.inputs.Ui }}
65+
SonarTokenUi: ${{ secrets.SONAR_TOKEN_UI }}
66+
SonarToken: ${{ secrets.SONAR_TOKEN }}
67+
NugetApiKey: ${{ secrets.NUGET_API_KEY }}
68+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
70+
- uses: phoenix-actions/test-reporting@v9
71+
if: always()
72+
with:
73+
name: DotNET - Tests
74+
output-to: checks
75+
path: '**/test-results.trx'
76+
reporter: dotnet-trx
77+
fail-on-error: false
78+
79+
- name: SonarCloud run
80+
uses: SonarSource/sonarcloud-github-action@master
81+
if: ${{ false }}
82+
env:
83+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
84+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_UI }}
85+
with:
86+
args: >
87+
-Dsonar.organization=
88+
-Dsonar.projectKey=
89+
-Dsonar.sources=src/Serilog.Ui.Web/assets/
90+
-Dsonar.tests=src/Serilog.Ui.Web/assets/
91+
-Dsonar.exclusions=src/Serilog.Ui.Web/assets/__tests__/**/*
92+
-Dsonar.test.inclusions=src/Serilog.Ui.Web/assets/__tests__/**/*
93+
-Dsonar.javascript.lcov.reportPaths=./src/Serilog.Ui.Web/coverage/lcov.info
94+
95+
- uses: phoenix-actions/test-reporting@v9
96+
if: always()
97+
with:
98+
name: JS - Tests
99+
output-to: checks
100+
path: '**/jest-*.xml'
101+
reporter: jest-junit
102+
fail-on-error: false

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,5 +349,9 @@ MigrationBackup/
349349
# Ionide (cross platform F# VS Code tools) working folder
350350
.ionide/
351351
nuget.exe
352-
353352
.vshistory/
353+
354+
coverage.xml
355+
coverage/
356+
357+
.nuke/temp/

0 commit comments

Comments
 (0)