Skip to content

Commit

Permalink
Merge pull request #73 from followynne/feat/ci-cd-with-nuke
Browse files Browse the repository at this point in the history
feat(ci-cd): nuke setup
  • Loading branch information
mo-esmp committed Apr 8, 2023
2 parents 810fbf9 + 049bfd6 commit 5f2e7e8
Show file tree
Hide file tree
Showing 57 changed files with 1,408 additions and 196 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/DotNET-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# ------------------------------------------------------------------------------
# <auto-generated>
#
# This code was generated.
#
# - To turn off auto-generation set:
#
# [CustomGithubActions (AutoGenerate = false)]
#
# - To trigger manual generation invoke:
#
# nuke --generate-configuration GitHubActions_DotNET-build --host GitHubActions
#
# </auto-generated>
# ------------------------------------------------------------------------------

name: DotNET-build

on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev

jobs:
ubuntu-latest:
name: ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Cache .nuke/temp, ~/.nuget/packages
uses: actions/cache@v3
with:
path: |
.nuke/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }}
- name: Run './build.cmd Backend_SonarScan_End'
run: ./build.cmd Backend_SonarScan_End
env:
SonarToken: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: phoenix-actions/test-reporting@v9
if: always()
with:
name: DotNET - Tests
output-to: checks
path: '**/test-results.trx'
reporter: dotnet-trx
fail-on-error: false
73 changes: 73 additions & 0 deletions .github/workflows/JS-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# ------------------------------------------------------------------------------
# <auto-generated>
#
# This code was generated.
#
# - To turn off auto-generation set:
#
# [CustomGithubActions (AutoGenerate = false)]
#
# - To trigger manual generation invoke:
#
# nuke --generate-configuration GitHubActions_JS-build --host GitHubActions
#
# </auto-generated>
# ------------------------------------------------------------------------------

name: JS-build

on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev

jobs:
ubuntu-latest:
name: ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Cache .nuke/temp, ~/.nuget/packages
uses: actions/cache@v3
with:
path: |
.nuke/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }}
- name: Run './build.cmd Frontend_Tests_Ci'
run: ./build.cmd Frontend_Tests_Ci
env:
SonarTokenUi: ${{ secrets.SONAR_TOKEN_UI }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: SonarCloud run
uses: SonarSource/sonarcloud-github-action@master
if: ${{ false }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_UI }}
with:
args: >
-Dsonar.organization=
-Dsonar.projectKey=
-Dsonar.sources=src/Serilog.Ui.Web/assets/
-Dsonar.tests=src/Serilog.Ui.Web/assets/
-Dsonar.exclusions=src/Serilog.Ui.Web/assets/__tests__/**/*
-Dsonar.test.inclusions=src/Serilog.Ui.Web/assets/__tests__/**/*
-Dsonar.javascript.lcov.reportPaths=./src/Serilog.Ui.Web/coverage/lcov.info
- uses: phoenix-actions/test-reporting@v9
if: always()
with:
name: JS - Tests
output-to: checks
path: '**/jest-*.xml'
reporter: jest-junit
fail-on-error: false
102 changes: 102 additions & 0 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# ------------------------------------------------------------------------------
# <auto-generated>
#
# This code was generated.
#
# - To turn off auto-generation set:
#
# [CustomGithubActions (AutoGenerate = false)]
#
# - To trigger manual generation invoke:
#
# nuke --generate-configuration GitHubActions_Release --host GitHubActions
#
# </auto-generated>
# ------------------------------------------------------------------------------

name: Release

on:
workflow_dispatch:
inputs:
ElasticProvider:
description: "Elastic Provider"
required: true
MongoProvider:
description: "Mongo Provider"
required: true
MsSqlProvider:
description: "Ms Sql Provider"
required: true
MySqlProvider:
description: "My Sql Provider"
required: true
PostgresProvider:
description: "Postgres Provider"
required: true
Ui:
description: "Ui"
required: true

jobs:
ubuntu-latest:
name: ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Cache .nuke/temp, ~/.nuget/packages
uses: actions/cache@v3
with:
path: |
.nuke/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }}
- name: Run './build.cmd Publish'
run: ./build.cmd Publish
env:
ElasticProvider: ${{ github.event.inputs.ElasticProvider }}
MongoProvider: ${{ github.event.inputs.MongoProvider }}
MsSqlProvider: ${{ github.event.inputs.MsSqlProvider }}
MySqlProvider: ${{ github.event.inputs.MySqlProvider }}
PostgresProvider: ${{ github.event.inputs.PostgresProvider }}
Ui: ${{ github.event.inputs.Ui }}
SonarTokenUi: ${{ secrets.SONAR_TOKEN_UI }}
SonarToken: ${{ secrets.SONAR_TOKEN }}
NugetApiKey: ${{ secrets.NUGET_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: phoenix-actions/test-reporting@v9
if: always()
with:
name: DotNET - Tests
output-to: checks
path: '**/test-results.trx'
reporter: dotnet-trx
fail-on-error: false

- name: SonarCloud run
uses: SonarSource/sonarcloud-github-action@master
if: ${{ false }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_UI }}
with:
args: >
-Dsonar.organization=
-Dsonar.projectKey=
-Dsonar.sources=src/Serilog.Ui.Web/assets/
-Dsonar.tests=src/Serilog.Ui.Web/assets/
-Dsonar.exclusions=src/Serilog.Ui.Web/assets/__tests__/**/*
-Dsonar.test.inclusions=src/Serilog.Ui.Web/assets/__tests__/**/*
-Dsonar.javascript.lcov.reportPaths=./src/Serilog.Ui.Web/coverage/lcov.info
- uses: phoenix-actions/test-reporting@v9
if: always()
with:
name: JS - Tests
output-to: checks
path: '**/jest-*.xml'
reporter: jest-junit
fail-on-error: false
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -349,5 +349,9 @@ MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
nuget.exe

.vshistory/

coverage.xml
coverage/

.nuke/temp/

0 comments on commit 5f2e7e8

Please sign in to comment.