test1
This commit is contained in:
@@ -3,16 +3,11 @@ 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
|
||||||
IMAGE_NAME: ${{ github.repository }}
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: "Build & Test"
|
name: "Build & Test"
|
||||||
@@ -27,14 +22,17 @@ jobs:
|
|||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup .NET
|
- name: Setup .NET
|
||||||
uses: actions/setup-dotnet@v4
|
uses: actions/setup-dotnet@v4
|
||||||
with:
|
with:
|
||||||
dotnet-version: |
|
dotnet-version: |
|
||||||
10.x
|
10.x
|
||||||
|
|
||||||
- name: "Restore/Build/Test"
|
- name: "Restore/Build/Test"
|
||||||
run: |
|
run: |
|
||||||
dotnet test ./src/LittleTown.sln --configuration Release --verbosity normal --logger trx --collect:"XPlat Code Coverage" --logger:"trx;LogFileName=test_results.xml"
|
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.
|
- 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
|
uses: danielpalme/ReportGenerator-GitHub-Action@v5.5.1
|
||||||
with:
|
with:
|
||||||
@@ -46,14 +44,6 @@ jobs:
|
|||||||
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 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
|
- name: Upload coverage via SSH
|
||||||
uses: appleboy/scp-action@v1
|
uses: appleboy/scp-action@v1
|
||||||
with:
|
with:
|
||||||
@@ -62,7 +52,7 @@ jobs:
|
|||||||
password: "password"
|
password: "password"
|
||||||
port: 2222
|
port: 2222
|
||||||
source: "coverage-report/*"
|
source: "coverage-report/*"
|
||||||
target: "/config/test"
|
target: "/config/${{ github.event.pull_request.number }}"
|
||||||
- name: Upload Combined Coverage XML
|
- name: Upload Combined Coverage XML
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
@@ -88,7 +78,6 @@ jobs:
|
|||||||
REPO_OWNER: mcmuzzle
|
REPO_OWNER: mcmuzzle
|
||||||
REPO_NAME: LittleTown
|
REPO_NAME: LittleTown
|
||||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||||
|
|
||||||
run: |
|
run: |
|
||||||
COMMENT_CONTENT=$(cat code-coverage-results.md)
|
COMMENT_CONTENT=$(cat code-coverage-results.md)
|
||||||
curl -X POST \
|
curl -X POST \
|
||||||
|
|||||||
Reference in New Issue
Block a user