Skip to content

Commit

Permalink
Create an html webpage that is uploaded as a github page (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
angelrti authored Jun 11, 2024
1 parent 8c763c9 commit c0cbf11
Show file tree
Hide file tree
Showing 42 changed files with 772 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: Testing Interoperability
name: 1 - Run Interoperability Tests
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
on: workflow_dispatch
jobs:
Testing_Interoperability:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11.4'
- name: Downloads assets
uses: robinraju/release-downloader@v1.7
uses: robinraju/release-downloader@v1.10
with:
latest: true
fileName: "*"
Expand All @@ -22,6 +22,8 @@ jobs:
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
- name: Generate timestamp file
run: date '+%Y-%m-%d-%H_%M_%S' > timestamp
- name: Run Interoperability script
run: |
source .venv/bin/activate
Expand All @@ -39,7 +41,7 @@ jobs:
- name: Generate xlsx report
run: |
source .venv/bin/activate
python3 generate_xlsx_report.py --input junit_interoperability_report.xml --output interoperability_report_$(date '+%Y-%m-%d-%H_%M_%S').xlsx
python3 generate_xlsx_report.py --input junit_interoperability_report.xml --output interoperability_report.xlsx
- name: XUnit Viewer
id: xunit-viewer
uses: AutoModality/action-xunit-viewer@v1
Expand All @@ -53,4 +55,5 @@ jobs:
path: |
./index.html
./junit_interoperability_report.xml
./interoperability_report*.xlsx
./interoperability_report.xlsx
./timestamp
46 changes: 46 additions & 0 deletions .github/workflows/2_upload_artifact.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: 2 - Upload Test Results to Drive
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
on: workflow_dispatch
jobs:
upload_artifact:
runs-on: ubuntu-latest
steps:
- name: Get Artifact
uses: dawidd6/action-download-artifact@v3
with:
name: interoperability_report
workflow: main.yml
- name: Create files to upload
run: |
current_date=$(cat timestamp)
mv index.html interoperability_report.html
for file in *; do \
mv "$file" "${file%.*}_$current_date.${file##*.}"; \
done
zip interoperability_report_$current_date.zip *
mkdir report_$current_date
mv *.zip report_$current_date/
mv *.xlsx report_$current_date/
- name: Upload zip artifact
uses: adityak74/google-drive-upload-git-action@main
with:
credentials: ${{ secrets.GCP_CREDENTIAL }}
filename: report_*/*.zip
folderId: ${{ secrets.DRIVE_FOLDER_ID }}
overwrite: "true"
mirrorDirectoryStructure: "true"
- name: Upload spreadsheet
uses: adityak74/google-drive-upload-git-action@main
with:
credentials: ${{ secrets.GCP_CREDENTIAL }}
filename: report_*/*.xlsx
folderId: ${{ secrets.DRIVE_FOLDER_ID }}
overwrite: "true"
mirrorDirectoryStructure: "true"
mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
- name: Attach detailed report html
uses: actions/upload-artifact@v4
with:
name: detailed_report
path: |
./interoperability_report*.html
55 changes: 55 additions & 0 deletions .github/workflows/3_generate_doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: 3 - Generate Test Report
run-name: ${{ github.actor }} is generating doc in GitHub Actions 🚀
on: workflow_dispatch
jobs:
generate_doc:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Get Artifact
uses: dawidd6/action-download-artifact@v3
with:
name: detailed_report
workflow: upload_artifact.yml

- name: Move the detailed report to output folder
run: |
mkdir -p doc/_static/html/
mv *.html doc/_static/html/
ls doc/_static/html
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11.4'

- name: Create virtual environment
run: |
python -m venv .venv
source .venv/bin/activate
- name: Setting up environment
run: |
pip install -r requirements_doc.txt
- name: Get latest XLSX and ZIP urls
env:
GCP_CREDENTIAL_STR: ${{ secrets.GCP_CREDENTIAL_STR }}
DRIVE_FOLDER_ID: ${{ secrets.DRIVE_FOLDER_ID }}
run: python get_latest_file_urls.py gdrive_url.py

- name: Build documentation
run: sphinx-build -b html doc html

- name: Zip the documentation
run: |
cd html
zip -r ../documentation.zip .
- name: Attach html documentation
uses: actions/upload-artifact@v4
with:
name: documentation
path: documentation.zip
42 changes: 42 additions & 0 deletions .github/workflows/4_publish_doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Simple workflow for deploying static content to GitHub Pages
name: 4 - Publish Test Report (GitHub pages)

on: workflow_dispatch

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Get Artifact
uses: dawidd6/action-download-artifact@v3
with:
name: documentation
workflow: generate_doc.yml
- run: |
mkdir html
unzip documentation.zip -d html
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './html/'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,18 @@ build/
.cache/

# Generated reports
*.html
*.xlsx
*.xml
*.zip
*.html

# Do not ignore templates
!doc/_templates/*.html

.DS_Store

# Generated documentation files
gdrive_url.py
html/
doc/detailed_report.rst
doc/test_results.rst
21 changes: 21 additions & 0 deletions COPYRIGHT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Copyright and license policy
============================

License
-------

Use and redistribution is source and binary forms is permitted subject to the
OMG-DDS INTEROPERABILITY TESTING LICENSE found at the following URL:

https://github.com/omg-dds/dds-rtps/blob/master/LICENSE.md

Copyright holders
-----------------

© 2024 Real-Time Innovations, Inc.
© 2024 Atostek Oy.
© 2024 Proyectos y Sistemas de Mantenimiento SL (eProsima).
© 2024 Kongsberg Defence & Aerospace.
© 2024 Object Computing, Inc.
© 2024 OpenDDS Foundation.
© 2024 Twin Oaks Computing, Inc.
46 changes: 23 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -449,34 +449,34 @@ The GitHub Actions process must be launched in the following cases:
To generate the report you should follow the next steps:
1. Go to *Actions*.

![Actions](./doc/img/img1.png)
![Actions](./doc/resource/_md/img/img1.png)

2. Go to *Testing Interoperability*.

![Testing-Interoperability](./doc/img/img2.png)
![Testing-Interoperability](./doc/resource/_md/img/img2.png)

3. Press *Run workflow*, select master branch (for the official tests).

![Run-workflow](./doc/img/img3.png)
![Run-workflow](./doc/resource/_md/img/img3.png)

4. Wait a few minutes until the new task is finished and then press it.\
Example of a successful and a failed test:

![Succeeded test](./doc/img/img4.png)
![Failed test](./doc/img/img5.png)
![Succeeded test](./doc/resource/_md/img/img4.png)
![Failed test](./doc/resource/_md/img/img5.png)


5. At the bottom of the page you can find the attached artifacts
in the **Artifacts** section that contains the generated report.
![Artifacts-1](./doc/img/img6.png)
![Artifacts-2](./doc/img/img7.png)
![Artifacts-1](./doc/resource/_md/img/img6.png)
![Artifacts-2](./doc/resource/_md/img/img7.png)

6. Download and unzip it. There is file called `index.html`, inside
`report.zip` that is the generated report. It will look something like this
(set pretty option):

![report-1](./doc/img/img8.png)
![report-2](./doc/img/img9.png)
![report-1](./doc/resource/_md/img/img8.png)
![report-2](./doc/resource/_md/img/img9.png)

> **Note**: The status of the GitHub Action will be **Failure** :x:,
if any of the Test Cases that we are testing has an error,
Expand Down Expand Up @@ -514,25 +514,25 @@ file.

Example:

![zip](./doc/img/img10.png)
![zip](./doc/resource/_md/img/img10.png)

Then, the executable should be uploaded to the corresponding release:

> **Note**: to do it with the command line see `gh release`
1. In the main page, go to *Releases*.

![Releases](./doc/img/img11.png)
![Releases](./doc/resource/_md/img/img11.png)

2. Inside the latest release, go to *Edit*.

![Edit](./doc/img/img12.png)
![Edit](./doc/resource/_md/img/img12.png)

3. Upload the executables in *Attach binaries by dropping them here or
selecting them* (leave all the other fields as they were).
Keep marked *Set as the latest release*, and press *Update release*.

![Attach](./doc/img/img13.png)
![Attach](./doc/resource/_md/img/img13.png)

> **Note**: once the executable is uploaded, the user should run
> GitHub Actions to generate a new report.
Expand Down Expand Up @@ -603,11 +603,11 @@ The name of the release and the tag should be as explained in
1. In the main page, go to *Releases*.
![Releases](./doc/img/img11.png)
![Releases](./doc/resource/_md/img/img11.png)
2. Go to *Draft a new release*.
![Draft a new release](./doc/img/img14.png)
![Draft a new release](./doc/resource/_md/img/img14.png)
3. Do:
* In *Choose a tag* write the name of the tag and select
Expand All @@ -621,7 +621,7 @@ The name of the release and the tag should be as explained in
* Make sure *Set as pre-release* is **not selected**.
* Press *Publish release*.
![Create release](./doc/img/img15.png)
![Create release](./doc/resource/_md/img/img15.png)
## Report Bugs
Expand All @@ -633,16 +633,16 @@ in the following way.
* Go to *Issues*.
![Issues](./doc/img/img16.png)
![Issues](./doc/resource/_md/img/img16.png)
* **Check the issue is not already submitted**.
* Select *New Issue*.
![New issue](./doc/img/img17.png)
![New issue](./doc/resource/_md/img/img17.png)
* Select Interoperability issue template, *Get Started*.
![Issue-Get started](./doc/img/img18.png)
![Issue-Get started](./doc/resource/_md/img/img18.png)
* Fill out the corresponding information:
* Title: `Problem with <QoS or parameter>`
Expand All @@ -651,16 +651,16 @@ in the following way.
* Copy the link to the GitHub Action workflow run.
* Example, from this page:
![Artifacts-1](./doc/img/img6.png)
![Artifacts-1](./doc/resource/_md/img/img6.png)
* Add any suggestion about how to fix it, or why
this is happening [Optional].
* Add another comment [Optional].
* In the section *Labels*, assign them to the vendors involved.
![Label-1](./doc/img/img19.png)
![Label-2](./doc/img/img20.png)
![Label-1](./doc/resource/_md/img/img19.png)
![Label-2](./doc/resource/_md/img/img20.png)
* Press *Submit new issue*.
![Template](./doc/img/img21.png)
![Template](./doc/resource/_md/img/img21.png)
Loading

0 comments on commit c0cbf11

Please sign in to comment.