Skip to content

Commit

Permalink
KISS
Browse files Browse the repository at this point in the history
  • Loading branch information
DejanMilicic committed Feb 5, 2021
1 parent 98b63e9 commit 4ac701b
Showing 1 changed file with 1 addition and 35 deletions.
36 changes: 1 addition & 35 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 4ac701b

Please sign in to comment.