Skip to content

R valgrind tests (pr=7068) #944

R valgrind tests (pr=7068)

R valgrind tests (pr=7068) #944

Workflow file for this run

name: R valgrind tests
# 'run-name' is used here to distinguish in the API between different runs from forks.
#
# When this was added, it was the only way to feed workflow inputs into something that
# would show up in the output of 'gh run list'.
#
# See https://github.com/orgs/community/discussions/73223#discussioncomment-11862624
run-name: R valgrind tests (pr=${{ inputs.pr-number }})
on:
workflow_dispatch:
inputs:
pr-branch:
type: string
description: |
Branch the PR was submitted from.
Branches from forks should be prefixed with the user/org they originate from,
like '{user}:{branch}'.
pr-number:
type: string
description: Pull request ID, found in the PR URL.
permissions:
actions: write
checks: write
contents: read
deployments: none
discussions: none
id-token: write
issues: none
packages: none
pages: none
pull-requests: write
repository-projects: none
security-events: none
statuses: write
jobs:
test-r-valgrind:
name: r-package (ubuntu-latest, R-devel, valgrind)
timeout-minutes: 360
runs-on: ubuntu-latest
container: wch1/r-debug
env:
GITHUB_TOKEN: ${{ github.token }}
steps:
- name: Install essential software before checkout
shell: bash
run: |
apt-get update
apt-get install --no-install-recommends -y \
curl \
jq
- name: Install GitHub CLI
run: |
GH_CLI_VERSION="2.83.0"
curl \
--fail \
-O \
-L \
https://github.com/cli/cli/releases/download/v${GH_CLI_VERSION}/gh_${GH_CLI_VERSION}_linux_amd64.tar.gz
tar -xvf ./gh_${GH_CLI_VERSION}_linux_amd64.tar.gz
mv ./gh_${GH_CLI_VERSION}_linux_amd64/bin/gh /usr/local/bin/
- name: Trust git cloning LightGBM
run: |
git config --global --add safe.directory "${GITHUB_WORKSPACE}"
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 5
submodules: true
persist-credentials: false
repository: microsoft/LightGBM
ref: "refs/pull/${{ inputs.pr-number }}/merge"
- name: Run tests with valgrind
shell: bash
run: ./.ci/test-r-package-valgrind.sh
- name: Send final status
if: ${{ always() }}
run: |
$GITHUB_WORKSPACE/.ci/set-commit-status.sh \
"${{ github.workflow }}" \
"${{ job.status }}" \
"${{ github.sha }}"
comment="Workflow **${{ github.workflow }}** has been triggered! 🚀\r\n"
comment="${comment}\r\n${GITHUB_SERVER_URL}/microsoft/LightGBM/actions/runs/${GITHUB_RUN_ID} \r\n"
comment="${comment}\r\nStatus: ${{ job.status }}"
$GITHUB_WORKSPACE/.ci/append-comment.sh \
"${{ inputs.pr-number }}" \
"${comment}"
- name: Rerun workflow-indicator
if: ${{ always() }}
run: |
bash $GITHUB_WORKSPACE/.ci/rerun-workflow.sh \
"optional_checks.yml" \
"${{ inputs.pr-branch }}" \
|| true