-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #695 from openSUSE/ci-yardoc
CI: Move the documentation check to a separate job
- Loading branch information
Showing
3 changed files
with
78 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: "CI - Documentation Check" | ||
|
||
on: | ||
push: | ||
paths: | ||
# NOTE: GitHub Actions do not allow using YAML references, the same path | ||
# list is used below for the pull request event. Keep both lists in sync!! | ||
|
||
# this file as well | ||
- .github/workflows/ci-doc-check.yml | ||
# all Ruby files | ||
- service/Gemfile* | ||
- service/*.gemspec | ||
- service/**.rb | ||
# the D-Bus introspection files | ||
- doc/dbus/**.xml | ||
|
||
pull_request: | ||
paths: | ||
# NOTE: GitHub Actions do not allow using YAML references, the same path | ||
# list is used above for the push event. Keep both lists in sync!! | ||
|
||
# this file as well | ||
- .github/workflows/ci-doc-check.yml | ||
# all Ruby files | ||
- service/Gemfile* | ||
- service/*.gemspec | ||
- service/**.rb | ||
# the D-Bus introspection files | ||
- doc/dbus/**.xml | ||
|
||
jobs: | ||
doc_check: | ||
runs-on: ubuntu-latest | ||
|
||
container: | ||
image: registry.opensuse.org/opensuse/tumbleweed:latest | ||
|
||
steps: | ||
|
||
- name: Git Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Fix the file owner | ||
# fix the file owner | ||
run: chown -R -c 0 . | ||
|
||
- name: Configure and refresh repositories | ||
# disable unused repositories to have faster refresh | ||
run: zypper modifyrepo -d repo-non-oss repo-openh264 repo-update && zypper ref | ||
|
||
- name: Install Ruby development files and XML tooling | ||
run: zypper --non-interactive install --no-recommends | ||
gcc gcc-c++ make libopenssl-devel ruby-devel augeas-devel diff | ||
libxslt-devel libxml2-devel xmlstarlet | ||
|
||
- name: Cache RubyGems | ||
uses: actions/cache@v3 | ||
with: | ||
key: "Gemfile-${{ hashFiles('service/Gemfile.lock') }}" | ||
path: service/vendor/bundle | ||
|
||
- name: Install RubyGems | ||
env: | ||
NOKOGIRI_USE_SYSTEM_LIBRARIES: 1 | ||
run: | | ||
bundle config set --local path 'vendor/bundle' | ||
bundle install | ||
working-directory: ./service | ||
|
||
- name: Generate doc | ||
run: bundle exec yardoc --fail-on-warning | ||
working-directory: ./service | ||
|
||
- name: Check that introspected API and its docs have not diverged | ||
run: make check | ||
working-directory: ./doc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters