From 7f5d4e3e047db802490be9b4591f2d312cebbac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Wed, 9 Aug 2023 14:38:48 +0200 Subject: [PATCH] CI: Move the documentation check to a separate job --- .github/workflows/ci-yardoc.yml | 66 +++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 38 ------------------- 2 files changed, 66 insertions(+), 38 deletions(-) create mode 100644 .github/workflows/ci-yardoc.yml diff --git a/.github/workflows/ci-yardoc.yml b/.github/workflows/ci-yardoc.yml new file mode 100644 index 0000000000..2df55487ac --- /dev/null +++ b/.github/workflows/ci-yardoc.yml @@ -0,0 +1,66 @@ +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-yardoc.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-yardoc.yml + # all Ruby files + - service/Gemfile* + - service/*.gemspec + - service/**.rb + # the D-Bus introspection files + - doc/dbus/**.xml + +jobs: + ruby_doc: + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + distro: [ "tumbleweed" ] + + container: + image: registry.opensuse.org/yast/head/containers_${{matrix.distro}}/yast-ruby + + steps: + + - 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 git gcc gcc-c++ make openssl-devel ruby-devel augeas-devel xmlstarlet + + - name: Git Checkout + uses: actions/checkout@v3 + + - name: Install RubyGems dependencies + run: bundle config set --local with 'development' && bundle install && bundle info yardoc + 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 -C check + working-directory: ./doc diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b8e9474eac..d941c5d41d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,44 +98,6 @@ jobs: flag-name: backend parallel: true - ruby_doc: - runs-on: ubuntu-latest - env: - COVERAGE: 1 - - defaults: - run: - working-directory: ./service - - strategy: - fail-fast: false - matrix: - distro: [ "tumbleweed" ] - - container: - image: registry.opensuse.org/yast/head/containers_${{matrix.distro}}/yast-ruby - - steps: - - - name: Git Checkout - uses: actions/checkout@v3 - - - 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 || zypper ref || zypper ref ) - - - name: Install Ruby development files and XML tooling - run: zypper --non-interactive install gcc gcc-c++ make openssl-devel ruby-devel npm augeas-devel xmlstarlet - - - name: Install RubyGems dependencies - run: bundle config set --local with 'development' && bundle install - - - name: Generate doc - run: bundle exec yardoc --fail-on-warning - - - name: Check that introspected API and its docs have not diverged - run: make -C ../doc check - rust_ci: runs-on: ubuntu-latest env: