-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
98b63e9
commit 4ac701b
Showing
1 changed file
with
1 addition
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,40 +27,6 @@ jobs: | |
- name: Build | ||
run: dotnet build ./src/Digitalis.sln --configuration $config --no-restore | ||
|
||
- name: set pr build number (if pr) | ||
id: PRNUMBER | ||
if: ${{ github.event_name == 'pull_request' }} | ||
uses: kkak10/[email protected] | ||
|
||
# set report file and title | ||
- name: Set Test Title | ||
run: | | ||
if ${{ github.event_name == 'pull_request' }} | ||
then | ||
echo "title=Test Run for PR #${{steps.PRNUMBER.outputs.pr}} (${{github.run_number}})" >> $GITHUB_ENV | ||
echo "file_name=TestReport.${{steps.PRNUMBER.outputs.pr}}.${{github.run_number}}.md" >> $GITHUB_ENV | ||
else | ||
echo "title=Test Run ${{github.run_number}}" >> $GITHUB_ENV | ||
echo "file_name=TestReport.${{github.run_number}}.md" >> $GITHUB_ENV | ||
fi | ||
# run tests with built project | ||
- name: Test PR | ||
run: dotnet test ./src/Digitalis.sln --no-restore --no-build --configuration $config --logger:"liquid.md;LogFileName=${{github.workspace}}/${{env.file_name}};Title=${{env.title}};" | ||
|
||
# upload report as build artifact | ||
- name: Upload a Build Artifact | ||
uses: actions/upload-artifact@v2 | ||
if: ${{always()}} | ||
with: | ||
name: 'Test Run' | ||
path: ${{github.workspace}}/${{env.file_name}} | ||
|
||
# add report as PR comment (if PR) | ||
- name: comment PR | ||
uses: machine-learning-apps/pr-comment@master | ||
if: ${{ github.event_name == 'pull_request' }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
path: ${{env.file_name}} | ||
run: dotnet test ./src/Digitalis.sln --no-restore --no-build --configuration $config |