-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added tests and GitHub Actions CI build
- Loading branch information
Showing
16 changed files
with
729 additions
and
55 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "nuget" | ||
directory: "/DryerDuty" | ||
schedule: | ||
interval: "weekly" |
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,63 @@ | ||
name: .NET | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
env: | ||
ProjectName: DryerDuty | ||
TargetPlatform: linux-arm | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Clone | ||
uses: actions/checkout@v3.5.2 | ||
|
||
- name: Initialize test reporting | ||
uses: testspace-com/setup-testspace@v1 | ||
with: | ||
domain: ${{ github.repository_owner }} | ||
|
||
- name: Restore | ||
run: dotnet restore --runtime ${{ env.TargetPlatform }} --locked-mode --verbosity normal | ||
|
||
- name: Build | ||
run: dotnet build --no-restore --configuration Release --runtime ${{ env.TargetPlatform }} --no-self-contained --verbosity normal | ||
|
||
- name: Test | ||
shell: bash | ||
run: | | ||
dotnet test --verbosity normal --configuration Release --collect:"XPlat Code Coverage" --settings Tests/Tests.runsettings --logger "trx;LogFileName=TestResults.xml" | ||
echo "TEST_EXIT_CODE=$?" >> $GITHUB_ENV | ||
cp Tests/TestResults/*/coverage.info Tests/TestResults | ||
exit 0 | ||
- name: Upload test report | ||
run: testspace Tests/TestResults/TestResults.xml | ||
|
||
- name: Upload coverage | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
path-to-lcov: Tests/TestResults/coverage.info | ||
|
||
- name: Stop if tests failed | ||
run: exit ${{ env.TEST_EXIT_CODE }} | ||
|
||
- name: Publish | ||
run: dotnet publish ${{ env.ProjectName }} --no-build --configuration Release -p:PublishSingleFile=true --runtime ${{ env.TargetPlatform }} --no-self-contained | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3.1.2 | ||
with: | ||
name: ${{ env.ProjectName }} | ||
path: | | ||
${{ env.ProjectName }}/bin/Release/net7.0/${{ env.TargetPlatform }}/publish/${{ env.ProjectName }} | ||
${{ env.ProjectName }}/bin/Release/net7.0/${{ env.TargetPlatform }}/publish/appsettings.json | ||
${{ env.ProjectName }}/bin/Release/net7.0/${{ env.TargetPlatform }}/publish/*.service | ||
${{ env.ProjectName }}/bin/Release/net7.0/${{ env.TargetPlatform }}/publish/*.so | ||
if-no-files-found: error |
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
Oops, something went wrong.