-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to platform agnostic thread safe Logger
- Loading branch information
1 parent
8427877
commit b5856aa
Showing
9 changed files
with
157 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: CI | ||
on: | ||
push: | ||
paths: | ||
- 'src/**' | ||
- '.github/workflows/**' | ||
pull_request: | ||
jobs: | ||
build: | ||
if: ${{ false }} # disable for now | ||
runs-on: ubuntu-latest | ||
env: | ||
SLN_FILE_NAME: Digitalroot.Valheim.PluginInfo.sln | ||
NUGET_AUTH_TOKEN: ${{secrets.NUGET_PAT}} | ||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | ||
DOTNET_CLI_TELEMETRY_OPTOUT: true | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Install dotnet | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
source-url: https://nuget.pkg.github.com/Digitalroot-Valheim/index.json | ||
- name: Restore packages | ||
run: dotnet restore src/${{ env.SLN_FILE_NAME }} --nologo | ||
- name: Build | ||
run: dotnet build src/${{ env.SLN_FILE_NAME }} -c Release --no-restore --nologo | ||
- name: Test | ||
run: dotnet test src/${{ env.SLN_FILE_NAME }} -c Release --no-build -l "trx;LogFileName=test-results.trx" --nologo | ||
- uses: actions/upload-artifact@v2 | ||
if: always() | ||
with: | ||
path: ./src/UnitTests/TestResults/test-results.trx | ||
name: test-results | ||
retention-days: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: NuGet Package | ||
on: | ||
push: | ||
branches: | ||
- main # Default release branch | ||
paths: | ||
- 'src/**' | ||
- '.github/workflows/**' | ||
jobs: | ||
deploy: | ||
if: ${{ false }} # disable for now | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: read | ||
env: | ||
SLN_FILE_NAME: Digitalroot.Valheim.PluginInfo.sln | ||
PROJ: Digitalroot.Valheim.PluginInfo | ||
NUGET_AUTH_TOKEN: ${{secrets.NUGET_PAT}} | ||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | ||
DOTNET_CLI_TELEMETRY_OPTOUT: true | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/[email protected] | ||
with: | ||
#dotnet-version: '3.1.x' # SDK Version to use. | ||
source-url: https://nuget.pkg.github.com/Digitalroot-Valheim/index.json | ||
- name: Check out repository code | ||
uses: actions/checkout@v2 | ||
- name: List files in the repository | ||
run: | | ||
ls ${{ github.workspace }} | ||
- name: Restore packages | ||
run: dotnet restore src/${{ env.SLN_FILE_NAME }} --nologo | ||
- name: Build | ||
run: dotnet build src/${{ env.SLN_FILE_NAME }} -c Release --no-restore --nologo | ||
- name: Test | ||
run: dotnet test src/${{ env.SLN_FILE_NAME }} -c Release --no-build --nologo | ||
- name: Create the package | ||
run: dotnet pack src/${{ env.PROJ }}/${{ env.PROJ }}.csproj -c Release --no-restore --no-build --nologo | ||
- name: Publish package to Digitalroot-Valheim nuget repository | ||
run: dotnet nuget push src/${{ env.PROJ }}/bin/Release/*.nupkg --skip-duplicate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: 'Test Report' | ||
on: | ||
workflow_run: | ||
workflows: ['CI'] # runs after CI workflow | ||
types: | ||
- completed | ||
jobs: | ||
report: | ||
if: ${{ false }} # disable for now | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: dorny/test-reporter@v1 | ||
with: | ||
artifact: test-results # artifact name | ||
name: NUnit Tests # Name of the check run which will be created | ||
path: '*.trx' # Path to test results (inside artifact .zip) | ||
reporter: dotnet-trx # Format of test results | ||
path-replace-backslashes: 'true' | ||
list-suites: 'all' | ||
list-tests: 'failed' | ||
max-annotations: '50' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters