Skip to content

Commit 82456ef

Browse files
committed
Generate analysis results references documentation
1 parent 4da7f9e commit 82456ef

File tree

12 files changed

+2037
-0
lines changed

12 files changed

+2037
-0
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Generate report reference documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "analysis-results/**" # Only run on changed analysis results
9+
- "!analysis-results/*.md" # Ignore report reference documentation changes (endless loop prevention)
10+
- ".github/workflows/internal-report-reference-documentation.yml" # Also run when this file was changed
11+
pull_request:
12+
branches:
13+
- main
14+
paths:
15+
- "analysis-results/**" # Only run on changed analysis results
16+
- "!analysis-results/*.md" # Ignore report reference documentation changes (endless loop prevention)
17+
- ".github/workflows/internal-report-reference-documentation.yml" # Also run when this file was changed
18+
19+
jobs:
20+
generate-report-reference-documentation:
21+
runs-on: ubuntu-latest
22+
outputs:
23+
generated_documents_changed: ${{ steps.set-generated_documents_changed.outputs.generated_documents_changed }}
24+
documentation-upload-name: ${{ steps.set-documentation-upload-name.outputs.documentation-upload-name }}
25+
26+
steps:
27+
- name: Checkout git repository
28+
uses: actions/checkout@v4
29+
30+
- name: Generate report reference document
31+
working-directory: analysis-results
32+
run: |
33+
./../documentation/analysis-reports-reference/generateReportReferences.sh
34+
35+
- name: Use git to detect changes in the regenerated documentation and set generated_documents_changed
36+
working-directory: analysis-results
37+
id: set-generated_documents_changed
38+
run: |
39+
git diff --quiet || echo "generated_documents_changed=true" >> "$GITHUB_OUTPUT"
40+
git --no-pager diff --name-only
41+
42+
- name: Display generated_documents_changed
43+
run: echo "generated_documents_changed=${{ steps.set-generated_documents_changed.outputs.generated_documents_changed }}"
44+
45+
- name: Generate ARTIFACT_UPLOAD_ID
46+
if: steps.set-generated_documents_changed.outputs.generated_documents_changed == 'true'
47+
run: echo "ARTIFACT_UPLOAD_ID=$(LC_ALL=C tr -dc 'A-Za-z0-9' < /dev/urandom | head -c 10)" >> $GITHUB_ENV
48+
49+
- name: Set documentation-upload-name
50+
if: steps.set-generated_documents_changed.outputs.generated_documents_changed == 'true'
51+
id: set-documentation-upload-name
52+
run: echo "documentation-upload-name=report-reference-documentation-${{ env.ARTIFACT_UPLOAD_ID }}" >> "$GITHUB_OUTPUT"
53+
54+
- name: Archive generated report references documents
55+
if: steps.set-generated_documents_changed.outputs.generated_documents_changed == 'true'
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: ${{ steps.set-documentation-upload-name.outputs.documentation-upload-name }}
59+
path: ./analysis-results/*.md
60+
if-no-files-found: error
61+
retention-days: 5
62+
63+
64+
commit-analysis-results:
65+
name: Commit Analysis Results
66+
needs: [generate-report-reference-documentation]
67+
uses: ./.github/workflows/internal-commit-results.yml
68+
if: needs.generate-report-reference-documentation.outputs.generated_documents_changed == 'true'
69+
with:
70+
commit-author-name: "${{ github.event.repository.name }} Continuous Integration"
71+
commit-author-email: "7671054+JohT@users.noreply.github.com"
72+
commit-message: "Automated code structure analysis results (CI)"
73+
commit-directory: "./analysis-results/*.md"
74+
uploaded-artifact-name: ${{ needs.generate-report-reference-documentation.outputs.documentation-upload-name }}
75+
secrets:
76+
repository-commit-token: ${{ secrets.WORKFLOW_GIT_ACCESS_TOKEN }}

.github/workflows/java-code-analysis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
# Ignore changes in documentation, general configuration and analysis-results for push events
88
paths-ignore:
99
- 'analysis-results/**'
10+
- 'documentation/**'
1011
- '**/*.md'
1112
- '**/*.txt'
1213
- '**/*.css'
@@ -24,6 +25,7 @@ on:
2425
# Ignore changes in documentation, general configuration and analysis-results for pull request events
2526
paths-ignore:
2627
- 'analysis-results/**'
28+
- 'documentation/**'
2729
- '**/*.md'
2830
- '**/*.txt'
2931
- '**/*.css'

.github/workflows/typescript-code-analysis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
# Ignore changes in documentation, general configuration and analysis-results for push events
88
paths-ignore:
99
- 'analysis-results/**'
10+
- 'documentation/**'
1011
- '**/*.md'
1112
- '**/*.txt'
1213
- '**/*.css'
@@ -24,6 +25,7 @@ on:
2425
# Ignore changes in documentation, general configuration and analysis-results for pull request events
2526
paths-ignore:
2627
- 'analysis-results/**'
28+
- 'documentation/**'
2729
- '**/*.md'
2830
- '**/*.txt'
2931
- '**/*.css'

COMMANDS.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Code Graph Analysis Pipeline - Commands
2+
3+
<!-- TOC -->
4+
5+
- [Generate Markdown References](#generate-markdown-references)
6+
- [Generate CSV Cypher Query Results Report Reference](#generate-csv-cypher-query-results-report-reference)
7+
- [Generate Jupyter Notebook Report Reference](#generate-jupyter-notebook-report-reference)
8+
- [Generate Image Reference](#generate-image-reference)
9+
10+
<!-- /TOC -->
11+
12+
## Generate Markdown References
13+
14+
### Generate CSV Cypher Query Results Report Reference
15+
16+
Change into the [analysis-results](./analysis-results/) directory e.g. with `cd analysis-results` and then execute the script [generateCsvReportReference.sh](./documentation/analysis-reports-reference/generateCsvReportReference.sh) with the following command:
17+
18+
👉**Note:** This script is automatically triggered in the pipeline [internal-report-reference-documentation.yml](.github/workflows/internal-report-reference-documentation.yml) and doesn't need to be executed manually normally.
19+
20+
```script
21+
./../documentation/analysis-reports-reference/generateCsvReportReference.sh
22+
```
23+
24+
### Generate Jupyter Notebook Report Reference
25+
26+
Change into the [analysis-results](./analysis-results/) directory e.g. with `cd analysis-results` and then execute the script [generateJupyterReportReference.sh](./documentation/analysis-reports-reference/generateJupyterReportReference.sh) with the following command:
27+
28+
👉**Note:** This script is automatically triggered in the pipeline [internal-report-reference-documentation.yml](.github/workflows/internal-report-reference-documentation.yml) and doesn't need to be executed manually normally.
29+
30+
```script
31+
./../documentation/analysis-reports-reference/generateJupyterReportReference.sh
32+
```
33+
34+
### Generate Image Reference
35+
36+
Change into the [analysis-results](./analysis-results/) directory e.g. with `cd analysis-results` and then execute the script [generateImageReference.sh](./documentation/analysis-reports-reference/generateImageReference.sh) with the following command:
37+
38+
👉**Note:** This script is automatically triggered in the pipeline [internal-report-reference-documentation.yml](.github/workflows/internal-report-reference-documentation.yml) and doesn't need to be executed manually normally.
39+
40+
```script
41+
./../documentation/analysis-reports-reference/generateImageReference.sh
42+
```

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,18 @@ Here are ten examples from over a hundred reports generated by the analysis. The
8383
8484
<img src="./analysis-results/AxonFramework/AxonFramework-4.10.3/wordcloud/Wordcloud_files/Wordcloud_17_0.png" width="600" alt="Word cloud of git authors">
8585
86+
## :page_with_curl: CSV Cypher Query Report Reference
87+
88+
[CSV_REPORTS.md](./analysis-results/CSV_REPORTS.md) lists all CSV Cypher query result reports inside the [results](./results) directory. It can be generated as described in [Generate CSV Report Reference](./COMMANDS.md#generate-csv-cypher-query-report-reference).
89+
90+
## :page_with_curl: Jupyter Notebook Report Reference
91+
92+
[JUPYTER_REPORTS.md](./analysis-results/JUPYTER_REPORTS.md) lists all Jupyter Notebook reports inside the [results](./results) directory. It can be generated as described in [Generate Jupyter Notebook Report Reference](./COMMANDS.md#generate-jupyter-notebook-report-reference).
93+
94+
## :camera: Image Reference
95+
96+
[IMAGES.md](./analysis-results/IMAGES.md) lists all PNG images inside the [results](./results) directory. It can be generated as described in [Generate Image Reference](./COMMANDS.md#generate-image-reference).
97+
8698
## Keeping the Analysis Workflow Updated with Renovate
8799
88100
This repository uses [Renovate](https://docs.renovatebot.com) to automatically update the analysis workflow to the latest version. To enable this, add the following extension to your Renovate configuration:

0 commit comments

Comments
 (0)