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

Show expandable R CMD check logs + upload them as artifact #241

Merged
merged 2 commits into from
Jun 17, 2024
Merged
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
21 changes: 18 additions & 3 deletions .github/workflows/build-check-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -694,9 +694,12 @@ jobs:
if: inputs.skip-r-cmd-check != true
run: |
find ${{ env.PKGNAME }}.Rcheck -type f -regextype posix-egrep \
-regex '.*00install.out|.*00check.log|.*00build.out' -print0 | while IFS= read -r -d $'\0' file; do
printf "==================================\n$file\n==================================\n"
cat $file
-regex '.*00install.out|.*00check.log|.*00build.out|.*-Ex.Rout|.*tests/testthat\.Rout.*' \
-print0 | while IFS= read -r -d $'\0' file; do
# Grouping allows to collapse/expand logs when needed.
echo "::group::$file"
cat $file
echo "::endgroup::"
done
shell: bash

Expand Down Expand Up @@ -782,6 +785,18 @@ jobs:
path: ${{ github.event.repository.name }}/${{ inputs.package-subdirectory }}/${{ env.PKGBUILD }}
name: ${{ env.PKGBUILD }}

- name: Upload logs artifact 🗞️
uses: actions/upload-artifact@v4
with:
path: |
${{ env.PKGNAME }}.Rcheck/*00install.out
${{ env.PKGNAME }}.Rcheck/*00check.log
${{ env.PKGNAME }}.Rcheck/*00build.out
${{ env.PKGNAME }}.Rcheck/*-Ex.Rout
${{ env.PKGNAME }}.Rcheck/tests/testthat.Rout
${{ env.PKGNAME }}.Rcheck/tests/testthat.Rout.fail
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't error out if one or more files are missing, correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's right, missing files are simply skipped.

name: check-logs-${{ env.PKGNAME }}

publish-junit-html-report:
name: Publish JUnit HTML report 📰
runs-on: ubuntu-latest
Expand Down
Loading