From 7f33f0bcaceb6eb4f2f678fdb97c805efde260da Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Mon, 28 Oct 2024 11:34:14 +0100 Subject: [PATCH 1/3] ci(#1699): Add Test Report --- .github/workflows/ci.yml | 22 ++++++---------------- .github/workflows/test-report.yml | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/test-report.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7249747614..dfd030faf8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -147,23 +147,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 + path: "TEST-*.xml" + retention-days: 1 - name: Clean up if: success() || failure() diff --git a/.github/workflows/test-report.yml b/.github/workflows/test-report.yml new file mode 100644 index 0000000000..ecf5a2567a --- /dev/null +++ b/.github/workflows/test-report.yml @@ -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 From 6fd7f83e6cf89e8f49247292ca62f6b2f5936f23 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Mon, 28 Oct 2024 12:29:06 +0100 Subject: [PATCH 2/3] ci: Use regex for artifact name --- .github/workflows/ci.yml | 20 +------------------- .github/workflows/test-report.yml | 2 +- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dfd030faf8..0cc60ca14e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -116,24 +116,6 @@ jobs: - name: Disk space cleanup uses: jlumbroso/free-disk-space@v1.3.1 - - 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 \ @@ -151,7 +133,7 @@ jobs: uses: actions/upload-artifact@v3 if: always() # always run even if the previous step fails with: - name: nf-test-test-results + name: "nf-test-test-results-${{ matrix.filter }}-${{ matrix.profile }}_${{ matrix.shard }}" path: "TEST-*.xml" retention-days: 1 diff --git a/.github/workflows/test-report.yml b/.github/workflows/test-report.yml index ecf5a2567a..eb3dbe65bf 100644 --- a/.github/workflows/test-report.yml +++ b/.github/workflows/test-report.yml @@ -14,7 +14,7 @@ jobs: steps: - uses: dorny/test-reporter@v1 with: - artifact: nf-test-test-results # artifact name + 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 From ab64cb26be56d227933e710d0ddf2e42f530aa1d Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Mon, 28 Oct 2024 12:48:09 +0100 Subject: [PATCH 3/3] test: touch sarek/main --- workflows/sarek/main.nf | 1 + 1 file changed, 1 insertion(+) diff --git a/workflows/sarek/main.nf b/workflows/sarek/main.nf index f60bc3d931..b7d3dc1868 100644 --- a/workflows/sarek/main.nf +++ b/workflows/sarek/main.nf @@ -998,6 +998,7 @@ def readFirstLineOfFastq(path) { log.warn "${e.message}" } return line + } /*