Check core doc coverage always

This commit is contained in:
Nobuyoshi Nakada 2025-10-09 09:18:39 +09:00
parent 77b62a8292
commit 3d2ee31fdc
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465
Notes: git 2025-10-09 01:59:07 +00:00

View File

@ -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