Skip to content

Chapter 7 cuDF: Correct pandas accelerator setup. #461

Chapter 7 cuDF: Correct pandas accelerator setup.

Chapter 7 cuDF: Correct pandas accelerator setup. #461

name: Test Notebook Format
on:
push:
branches:
- '**'
- '!gh-readonly-queue/**'
merge_group:
concurrency:
group: ${{ github.workflow }}-on-${{ github.event_name }}-from-${{ github.ref_name }}
cancel-in-progress: true
# Minimal permissions - only read access needed for checks
permissions:
contents: read
jobs:
test-notebook-format:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install nbformat
run: pip install nbformat
- name: Check notebook format
id: notebook-format-check
run: |
set -o pipefail
python3 brev/test-notebook-format.py 2>&1 | tee ./notebook-format-output.txt
- name: Get PR info
id: get-pr-info
if: always() && startsWith(github.ref_name, 'pull-request/')
uses: nv-gha-runners/get-pr-info@main
- name: Save PR comment data
if: always()
run: |
mkdir -p ./pr-comment-data
PR_NUMBER='${{ startsWith(github.ref_name, 'pull-request/') && fromJSON(steps.get-pr-info.outputs.pr-info).number || '' }}'
echo "${PR_NUMBER}" > ./pr-comment-data/pr_number
if [ -f ./notebook-format-output.txt ]; then
sed 's/\x1b\[[0-9;]*m//g' ./notebook-format-output.txt > ./pr-comment-data/error_output
fi
- name: Upload PR comment data
if: always()
uses: actions/upload-artifact@v4
with:
name: pr-comment-data
path: pr-comment-data/
retention-days: 1