Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add full test report #1701

Draft
wants to merge 3 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 6 additions & 34 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,24 +116,6 @@ jobs:
- name: Disk space cleanup
uses: jlumbroso/[email protected]

- name: Start summary
id: print-test
run: |
echo "## nf-test tests summary :rocket:" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "This \`${{ matrix.filter }}\` ${{ matrix.shard }}/5 shard was run on \`${{ matrix.profile }}\` | \`NXF_VER=${{ matrix.NXF_VER }}\`, and contains the following test(s):" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
nf-test test \
--ci \
--dryRun \
--junitxml="TEST-${{ matrix.filter }}_${{ matrix.profile }}_${{ matrix.shard }}.xml" \
--shard ${{ matrix.shard }}/5 \
--changed-since HEAD^ \
--follow-dependencies \
--profile "+${{ matrix.profile }}" \
--filter ${{ matrix.filter }} \
| grep PASSED | cut -d "'" -f 2 | sed 's/^/- /' | sort -u >> $GITHUB_STEP_SUMMARY

- name: "Run tests | ${{ matrix.filter }}_${{ matrix.profile }} | ${{ matrix.shard }}/5"
run: |
nf-test test \
Expand All @@ -147,23 +129,13 @@ jobs:
--profile "+${{ matrix.profile }}" \
--filter ${{ matrix.filter }}

- name: Print success in summary
if: success()
run: |
echo "" >> $GITHUB_STEP_SUMMARY
echo "All test(s) successfull :tada:" >> $GITHUB_STEP_SUMMARY

- name: Print failure in summary
if: failure()
run: |
echo "" >> $GITHUB_STEP_SUMMARY
echo "Some test(s) failed :cold_sweat:" >> $GITHUB_STEP_SUMMARY

- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure() # always run even if the previous step fails
- name: Upload Test Report
uses: actions/upload-artifact@v3
if: always() # always run even if the previous step fails
with:
report_paths: "TEST-*.xml"
name: "nf-test-test-results-${{ matrix.filter }}-${{ matrix.profile }}_${{ matrix.shard }}"
path: "TEST-*.xml"
retention-days: 1

- name: Clean up
if: success() || failure()
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/test-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Test Report"
on:
workflow_run:
workflows: ["nf-core CI"] # runs after CI workflow
types:
- completed
permissions:
contents: read
actions: read
checks: write
jobs:
report:
runs-on: ubuntu-latest
steps:
- uses: dorny/test-reporter@v1
with:
artifact: /nf-test-test-results-(.*)/ # artifact name
name: nf-test Tests # Name of the check run which will be created
path: "TEST-*.xml" # Path to test results (inside artifact .zip)
reporter: java-junit # Format of test results
1 change: 1 addition & 0 deletions workflows/sarek/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,7 @@ def readFirstLineOfFastq(path) {
log.warn "${e.message}"
}
return line

}

/*
Expand Down
Loading