mirror of
https://github.com/ruby/ruby.git
synced 2026-01-27 04:24:23 +00:00
Check core doc coverage always
This commit is contained in:
parent
77b62a8292
commit
3d2ee31fdc
Notes:
git
2025-10-09 01:59:07 +00:00
33
.github/workflows/check_misc.yml
vendored
33
.github/workflows/check_misc.yml
vendored
@ -60,23 +60,16 @@ jobs:
|
||||
- name: Check if to generate documents
|
||||
id: rdoc
|
||||
run: |
|
||||
ref=$(sed 's/#.*//;/^rdoc /!d' gems/bundled_gems | awk '{print $4}')
|
||||
echo ref=$ref >> $GITHUB_OUTPUT
|
||||
# Generate only when document commit/PR
|
||||
if: >-
|
||||
${{false
|
||||
|| contains(github.event.head_commit.message, '[ruby/rdoc]')
|
||||
|| contains(github.event.head_commit.message, '[DOC]')
|
||||
|| contains(github.event.pull_request.title, '[DOC]')
|
||||
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
|
||||
}}
|
||||
set -- $(sed 's/#.*//;/^rdoc /!d' gems/bundled_gems)
|
||||
{ echo version=$2; echo ref=$4; } >> $GITHUB_OUTPUT
|
||||
echo RDOC='ruby -W0 --disable-gems tool/rdoc-srcdir -q' >> $GITHUB_ENV
|
||||
|
||||
- name: Checkout rdoc
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
repository: ruby/rdoc
|
||||
ref: ${{ steps.rdoc.outputs.ref }}
|
||||
path: .bundle/gems/rdoc-0
|
||||
path: .bundle/gems/rdoc-${{ steps.rdoc.outputs.version }}
|
||||
if: ${{ steps.rdoc.outputs.ref != '' }}
|
||||
|
||||
- name: Generate rdoc
|
||||
@ -88,18 +81,26 @@ jobs:
|
||||
bundle config --local path vendor/bundle
|
||||
bundle install --jobs 4
|
||||
bundle exec rake generate
|
||||
working-directory: .bundle/gems/rdoc-0
|
||||
working-directory: .bundle/gems/rdoc-${{ steps.rdoc.outputs.version }}
|
||||
if: ${{ steps.rdoc.outputs.ref != '' }}
|
||||
|
||||
- name: Core docs coverage
|
||||
run: |
|
||||
$RDOC -C -x ^ext -x ^lib .
|
||||
|
||||
- name: Generate docs
|
||||
id: docs
|
||||
run: |
|
||||
$RDOC -C -x ^ext -x ^lib .
|
||||
$RDOC --op html .
|
||||
echo htmlout=ruby-html-${GITHUB_SHA:0:10} >> $GITHUB_OUTPUT
|
||||
env:
|
||||
RDOC: ruby -W0 --disable-gems tool/rdoc-srcdir -q
|
||||
if: ${{ steps.rdoc.outcome == 'success' }}
|
||||
# Generate only when document commit/PR
|
||||
if: >-
|
||||
${{false
|
||||
|| contains(github.event.head_commit.message, '[ruby/rdoc]')
|
||||
|| contains(github.event.head_commit.message, '[DOC]')
|
||||
|| contains(github.event.pull_request.title, '[DOC]')
|
||||
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
|
||||
}}
|
||||
|
||||
- name: Upload docs
|
||||
uses: actions/upload-artifact@v4
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user