cicd

作者: nvidia

NeMo-RL 的 CI/CD 参考,涵盖 GitHub Actions 流水线结构、通过 /ok to test 触发 CI,以及 CI 失败排查。

npx skills add https://github.com/NVIDIA-NeMo/RL --skill cicd

CI/CD Guide


How CI Works

NeMo-RL CI runs on GitHub Actions. Workflows live in .github/workflows/.

The main test workflow triggers on pushes to pull-request/<number> branches. These branches are created automatically by copy-pr-bot when a contributor pushes to their fork and the PR receives a trust signal:

  • The commit is GPG-signed by a maintainer, or
  • A maintainer posts /ok to test <full-sha> as a PR comment.

Triggering CI

After pushing a new commit to your PR, trigger CI with:

/ok to test <full-commit-sha>

Use git rev-parse HEAD (not the short form) to get the full SHA.

Re-triggering after new commits: each /ok to test <sha> is specific to that SHA. After pushing additional commits, post a new comment with the updated SHA.


CI Labels

Every PR must have exactly one CI:* label — the quality-check job stays red until one is attached. Labels control which test tier runs and whether a new container image is built.

LabelWhat runsContainer
CI:docsDoc tests onlyReuses main container
CI:LfastFast test subsetReuses main container
CI:L0Unit tests + docs + lintBuilds new image
CI:L1L0 + functional testsBuilds new image
CI:L2L1 + convergence testsBuilds new image
Skip CICDNothing (skips all tests)

Default on merge group / push to main: L1.

Which label to attach when opening a PR:

Changed paths / nature of changeLabel
Docs only (docs/, *.md, docstrings)CI:docs
Trivial fix, no logic changeCI:Lfast
New code, bug fix, refactorCI:L0
Changes that could affect model behaviourCI:L1
Changes that could affect convergenceCI:L2

CI Failure Investigation

# List recent workflow runs for the PR
gh run list --repo NVIDIA-NeMo/RL --branch "pull-request/<pr-number>"

# View failing run summary
gh run view <run-id> --repo NVIDIA-NeMo/RL

# Stream failing job output
gh run view <run-id> --repo NVIDIA-NeMo/RL --log-failed

Common failure patterns:

SymptomLikely causeFix
CI never startsNo trust signal or copy-pr-bot not triggeredPost /ok to test <sha>
semantic-pull-request failsPR title doesn't follow Conventional CommitsFix PR title; see contributing skill
Linting failsStyle violationRun uv run ruff check --fix . && uv run ruff format .
Unit test failureCode regression or missing dependencyReproduce locally; see testing skill