Skip to content
Merged
Changes from 20 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
27 changes: 26 additions & 1 deletion .github/workflows/r_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,35 @@ jobs:
$env:TASK = "${{ matrix.task }}"
conda init powershell
& "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1"
test-r-sanitizers:
name: r-package (ubuntu-latest, R-devel, GCC ASAN/UBSAN)
timeout-minutes: 60
runs-on: ubuntu-latest
container:
image: rhub/rocker-gcc-san
steps:
- name: Checkout repository
uses: actions/checkout@v1
with:
fetch-depth: 5
submodules: true
- name: install
shell: bash
run: |
Rscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'testthat'), repos = 'http://cran.r-project.org')"
sh build-cran-package.sh
Rdevel CMD INSTALL lightgbm_*.tar.gz
- name: test
shell: bash
run: |
cd R-package/tests
Rscriptdevel testthat.R 2>&1 > ubsan-tests.log
cat ubsan-tests.log
Copy link
Collaborator

Choose a reason for hiding this comment

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

Was it left intentionally or it was for debugging purposes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I left it in intentionally, so that if the job fails you have enough logs to be able to tell what went wrong

Copy link
Collaborator

Choose a reason for hiding this comment

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

OK.

exit $(cat ubsan-tests.log | grep "runtime error" | wc -l)
all-successful:
# https://github.bileizhen.workers.devmunity/t/is-it-possible-to-require-all-github-actions-tasks-to-pass-without-enumerating-them/117957/4?u=graingert
runs-on: ubuntu-latest
needs: [test]
needs: [test, test-r-sanitizers]
steps:
- name: Note that all tests succeeded
run: echo "🎉"