Skip to content

Commit

Permalink
CI: Move the documentation check to a separate job
Browse files Browse the repository at this point in the history
- Cache the installed RubyGems
  • Loading branch information
lslezak committed Aug 9, 2023
1 parent e9bff87 commit 5c5f109
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 45 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/ci-doc-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
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

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: 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 gcc gcc-c++ make libopenssl-devel ruby-devel augeas-devel xmlstarlet

- name: Cache RubyGems
uses: actions/cache@v3
with:
key: "Gemfile-${{ hashFiles('service/Gemfile.lock') }}"
path: service/vendor/bundle

- name: Install RubyGems
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
38 changes: 0 additions & 38 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![CI Status](https://github.com/openSUSE/agama/actions/workflows/ci.yml/badge.svg)](https://github.com/openSUSE/agama/actions/workflows/ci.yml)
[![CI - Rubocop](https://github.com/openSUSE/agama/actions/workflows/ci-rubocop.yml/badge.svg)](https://github.com/openSUSE/agama/actions/workflows/ci-rubocop.yml)
[![CI - Documentation Check](https://github.com/openSUSE/agama/actions/workflows/ci-doc-check.yml/badge.svg)](https://github.com/openSUSE/agama/actions/workflows/ci-doc-check.yml)
[![CI - Integration Tests](https://github.com/openSUSE/agama/actions/workflows/ci-integration-tests.yml/badge.svg)](https://github.com/openSUSE/agama/actions/workflows/ci-integration-tests.yml)
[![Coverage Status](https://coveralls.io/repos/github/openSUSE/agama/badge.svg?branch=master)](https://coveralls.io/github/openSUSE/agama?branch=master)
[![GitHub Pages](https://github.com/openSUSE/agama/actions/workflows/github-pages.yml/badge.svg)](https://github.com/openSUSE/agama/actions/workflows/github-pages.yml)
Expand Down Expand Up @@ -64,13 +65,15 @@ Agama is a new Linux installer born in the core of the YaST team. It is designed

## Table of Content

* [Why a New Installer](#why-a-new-installer)
* [Architecture](#architecture)
* [How to Run](#how-to-run)
* [Live ISO Image](#live-iso-image)
* [Manual Configuration](#manual-configuration)
* [How to Contribute](#how-to-contribute)
* [Development Notes](#development-notes)
- [Agama: A Service-based Linux Installer](#agama-a-service-based-linux-installer)
- [Table of Content](#table-of-content)
- [Why a New Installer](#why-a-new-installer)
- [Architecture](#architecture)
- [How to run](#how-to-run)
- [Live ISO Image](#live-iso-image)
- [Manual Configuration](#manual-configuration)
- [How to Contribute](#how-to-contribute)
- [Development Notes](#development-notes)

## Why a New Installer

Expand Down

0 comments on commit 5c5f109

Please sign in to comment.