Compare commits
1 Commits
63f1a467c0
...
2a31e02556
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2a31e02556 |
24
.gitea/workflows/Main.yaml
Normal file
24
.gitea/workflows/Main.yaml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
name: check main state
|
||||||
|
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
dotnet-version: [ '10.0.x' ]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
- name: Setup dotnet
|
||||||
|
uses: actions/setup-dotnet@v5
|
||||||
|
with:
|
||||||
|
dotnet-version: '10.0.x'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: dotnet restore ./src/LittleTown.sln
|
||||||
|
- name: Build
|
||||||
|
run: dotnet build ./src/LittleTown.sln
|
||||||
|
- name: Test with the dotnet CLI
|
||||||
|
run: dotnet test ./src/LittleTown.sln
|
||||||
@@ -3,8 +3,12 @@ name: "Main Build Process"
|
|||||||
# Runs on main branch commits,
|
# Runs on main branch commits,
|
||||||
# every commit in a pull request, any published release.
|
# every commit in a pull request, any published release.
|
||||||
on:
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["main"]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: ["main"]
|
branches: ["main"]
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: gitea.borealian.ovh
|
REGISTRY: gitea.borealian.ovh
|
||||||
@@ -35,32 +39,23 @@ jobs:
|
|||||||
uses: danielpalme/ReportGenerator-GitHub-Action@v5.5.1
|
uses: danielpalme/ReportGenerator-GitHub-Action@v5.5.1
|
||||||
with:
|
with:
|
||||||
reports: "**/*.cobertura.xml" # REQUIRED # The coverage reports that should be parsed (separated by semicolon). Globbing is supported.
|
reports: "**/*.cobertura.xml" # REQUIRED # The coverage reports that should be parsed (separated by semicolon). Globbing is supported.
|
||||||
targetdir: "${{ github.workspace }}/coverage-report" # REQUIRED # The directory where the generated report should be saved.
|
targetdir: "${{ github.workspace }}" # REQUIRED # The directory where the generated report should be saved.
|
||||||
reporttypes: "Html;MarkdownSummary;Cobertura" # The output formats and scope (separated by semicolon) Values: Badges, Clover, Cobertura, CsvSummary, Html, Html_Dark, Html_Light, Html_BlueRed, HtmlChart, HtmlInline, HtmlInline_AzurePipelines, HtmlInline_AzurePipelines_Dark, HtmlInline_AzurePipelines_Light, HtmlSummary, JsonSummary, Latex, LatexSummary, lcov, MarkdownSummary, MarkdownSummaryGithub, MarkdownDeltaSummary, MHtml, PngChart, SonarQube, TeamCitySummary, TextSummary, TextDeltaSummary, Xml, XmlSummary
|
reporttypes: "Cobertura" # The output formats and scope (separated by semicolon) Values: Badges, Clover, Cobertura, CsvSummary, Html, Html_Dark, Html_Light, Html_BlueRed, HtmlChart, HtmlInline, HtmlInline_AzurePipelines, HtmlInline_AzurePipelines_Dark, HtmlInline_AzurePipelines_Light, HtmlSummary, JsonSummary, Latex, LatexSummary, lcov, MarkdownSummary, MarkdownSummaryGithub, MarkdownDeltaSummary, MHtml, PngChart, SonarQube, TeamCitySummary, TextSummary, TextDeltaSummary, Xml, XmlSummary
|
||||||
verbosity: "Info" # The verbosity level of the log messages. Values: Verbose, Info, Warning, Error, Off
|
verbosity: "Info" # The verbosity level of the log messages. Values: Verbose, Info, Warning, Error, Off
|
||||||
title: "Code Coverage" # Optional title.
|
title: "Code Coverage" # Optional title.
|
||||||
tag: "${{ github.run_number }}_${{ github.run_id }}" # Optional tag or build version.
|
tag: "${{ github.run_number }}_${{ github.run_id }}" # Optional tag or build version.
|
||||||
customSettings: "" # Optional custom settings (separated by semicolon). See: https://github.com/danielpalme/ReportGenerator/wiki/Settings.
|
customSettings: "" # Optional custom settings (separated by semicolon). See: https://github.com/danielpalme/ReportGenerator/wiki/Settings.
|
||||||
toolpath: "reportgeneratortool" # Default directory for installing the dotnet tool.
|
toolpath: "reportgeneratortool" # Default directory for installing the dotnet tool.
|
||||||
- name: Upload coverage via SSH
|
|
||||||
uses: appleboy/scp-action@v1
|
|
||||||
with:
|
|
||||||
host: "192.168.1.103"
|
|
||||||
username: "gitea"
|
|
||||||
password: "password"
|
|
||||||
port: 2222
|
|
||||||
source: "${{ github.workspace }}/coverage-report/*"
|
|
||||||
target: "/config/test"
|
|
||||||
- name: Upload Combined Coverage XML
|
- name: Upload Combined Coverage XML
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: coverage
|
name: coverage
|
||||||
path: ${{ github.workspace }}/coverage-report/Cobertura.xml
|
path: ${{ github.workspace }}/Cobertura.xml
|
||||||
retention-days: 5
|
retention-days: 5
|
||||||
- name: Publish Code Coverage Report
|
- name: Publish Code Coverage Report
|
||||||
uses: irongut/CodeCoverageSummary@v1.3.0
|
uses: irongut/CodeCoverageSummary@v1.3.0
|
||||||
with:
|
with:
|
||||||
filename: "coverage-report/Cobertura.xml"
|
filename: "Cobertura.xml"
|
||||||
badge: true
|
badge: true
|
||||||
fail_below_min: false # just informative for now
|
fail_below_min: false # just informative for now
|
||||||
format: markdown
|
format: markdown
|
||||||
@@ -79,7 +74,6 @@ jobs:
|
|||||||
|
|
||||||
run: |
|
run: |
|
||||||
COMMENT_CONTENT=$(cat code-coverage-results.md)
|
COMMENT_CONTENT=$(cat code-coverage-results.md)
|
||||||
COMMENT_CONTENT="${COMMENT_CONTENT}\n\n📊 [Rapport HTML complet](https://docs.borealian.ovh/workspace/mcmuzzle/LittleTown/coverage-report/index.html)"
|
|
||||||
curl -X POST \
|
curl -X POST \
|
||||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
|
|||||||
Reference in New Issue
Block a user