test1
This commit is contained in:
@@ -3,16 +3,11 @@ name: "Main Build Process"
|
||||
# Runs on main branch commits,
|
||||
# every commit in a pull request, any published release.
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
pull_request:
|
||||
branches: ["main"]
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
env:
|
||||
REGISTRY: gitea.borealian.ovh
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
jobs:
|
||||
build:
|
||||
name: "Build & Test"
|
||||
@@ -27,14 +22,17 @@ jobs:
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: |
|
||||
10.x
|
||||
|
||||
- name: "Restore/Build/Test"
|
||||
run: |
|
||||
dotnet test ./src/LittleTown.sln --configuration Release --verbosity normal --logger trx --collect:"XPlat Code Coverage" --logger:"trx;LogFileName=test_results.xml"
|
||||
|
||||
- name: Combine Coverage Reports # This is because one report is produced per project, and we want one result for all of them.
|
||||
uses: danielpalme/ReportGenerator-GitHub-Action@v5.5.1
|
||||
with:
|
||||
@@ -46,14 +44,6 @@ jobs:
|
||||
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.
|
||||
toolpath: "reportgeneratortool" # Default directory for installing the dotnet tool.
|
||||
- name: Upload coverage report (debug)
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: coverage-report
|
||||
path: coverage-report/
|
||||
if-no-files-found: error
|
||||
- name: Publish coverage to pages
|
||||
run: ls coverage-report
|
||||
- name: Upload coverage via SSH
|
||||
uses: appleboy/scp-action@v1
|
||||
with:
|
||||
@@ -62,7 +52,7 @@ jobs:
|
||||
password: "password"
|
||||
port: 2222
|
||||
source: "coverage-report/*"
|
||||
target: "/config/test"
|
||||
target: "/config/${{ github.event.pull_request.number }}"
|
||||
- name: Upload Combined Coverage XML
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
@@ -88,7 +78,6 @@ jobs:
|
||||
REPO_OWNER: mcmuzzle
|
||||
REPO_NAME: LittleTown
|
||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||
|
||||
run: |
|
||||
COMMENT_CONTENT=$(cat code-coverage-results.md)
|
||||
curl -X POST \
|
||||
|
||||
Reference in New Issue
Block a user