Skip to content

Commit

Permalink
[ELITERT-1198] Generate reports alongside documentation
Browse files Browse the repository at this point in the history
* Changes the documentation generation action to include the generation
  of the following reports:

 - Test Results Report (generated by RSpec)
 - Code Coverage (generated by SimpleCOV)
 - Static Code Analysis (generated by Rubocop)

* Changes the links in the "Links and Resources" page of the
  documentation to make them point to the generated assets instead of
  the internal Jenkins locations.
  • Loading branch information
Sergio Bobillier committed Nov 7, 2024
1 parent a983c2c commit 8284df7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/sphinx-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
name: Sphinx Documentation

on:
# REMOVE THIS BEFORE MERGING!!!!
pull_request:
branches: [ "master" ]
push:
branches: [ "master" ]

Expand All @@ -14,6 +17,9 @@ jobs:

runs-on: ubuntu-latest

env:
COVERAGE: true

steps:
- uses: actions/checkout@v4
- name: Set up Ruby
Expand All @@ -24,6 +30,15 @@ jobs:
with:
ruby-version: 2.7.7
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Test Results and Coverage
run:
bundler exec rspec --format html -o documentation/build/html/test_results/index.html
- name: Move Coverage Report
run:
mv coverage documentation/build/html/coverage
- name: Static Analysis Report
run:
bundler exec rubocop . --format html -o documentation/build/html/static_code_analysis/index.html || true
- name: Generate YARD documentation
run: |
bundler exec yard doc . --exclude vendor/ -o documentation/build/html/yard
Expand Down
6 changes: 3 additions & 3 deletions documentation/source/appendix/links_and_resources.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ Build Infrastructure
Test Results
------------

* `Tests Results <https://jenkins.int.esrlabs.com/job/Testing-Tools/job/dragnet/job/dragnet-verifier/Test_20Results/>`_
* `Tests Results <../test_results/index.html>`_

Static Code Analysis
--------------------

* `Rubocop Report <https://jenkins.int.esrlabs.com/job/Testing-Tools/job/dragnet/job/dragnet-verifier/Rubocop_20Report/>`_
* `Rubocop Report <../static_code_analysis/index.html>`_

Code Coverage
-------------

* `Code Coverage Report <https://jenkins.int.esrlabs.com/job/Testing-Tools/job/dragnet/job/dragnet-verifier/Coverage_20Report/>`_
* `Code Coverage Report <../coverage/index.html>`_

Requirements Coverage
---------------------
Expand Down

0 comments on commit 8284df7

Please sign in to comment.