Skip to content

Commit 68de2d8

Browse files
committed
Document public reuseable workflow
1 parent 1baec56 commit 68de2d8

File tree

4 files changed

+48
-2
lines changed

4 files changed

+48
-2
lines changed

.github/workflows/internal-check-links-in-documentation.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
- 'README.md'
1010
- 'COMMANDS.md'
1111
- 'GETTING_STARTED.md'
12+
- 'INTEGRATION.md'
1213
- '.github/workflows/check-links-in-documentation.yml' # also run when this file was changed
1314
schedule:
1415
- cron: "15 6 1 * *" # On the first day of each month at 6:15 o'clock
@@ -36,6 +37,6 @@ jobs:
3637
3738
- name: Check links in top level documentation Markdown files
3839
if: ${{ ! env.skip_link_check}}
39-
run: npx --yes [email protected] --verbose --alive=200,202,206 --retry README.md COMMANDS.md GETTING_STARTED.md
40+
run: npx --yes [email protected] --verbose --alive=200,202,206 --retry README.md COMMANDS.md GETTING_STARTED.md INTEGRATION.md
4041
# Temporarily, everything is done using command line options rather than with the config file, which doesn't seem to work.
4142
# Maybe related to https://github.com/tcort/markdown-link-check/issues/379 ?

COMMANDS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ Change into the [scripts](./scripts/) directory e.g. with `cd scripts` and then
193193
The following command shows how to use [markdown-link-check](https://github.com/tcort/markdown-link-check) to for example check the links in the [README.md](./README.md) file:
194194

195195
```script
196-
npx --yes markdown-link-check --quiet --progress --config=markdown-lint-check-config.json README.md COMMANDS.md GETTING_STARTED.md
196+
npx --yes markdown-link-check --quiet --progress --config=markdown-lint-check-config.json README.md COMMANDS.md GETTING_STARTED.md INTEGRATION.md
197197
```
198198

199199
## Manual Setup

INTEGRATION.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Code Graph Analysis Pipeline - Integration guide
2+
3+
This document describes the steps to get started as quickly as possible.
4+
:point_right: For more details on what else you can do see [README](./README.md).
5+
:point_right: For more details on how to analyze your code locally see [GETTING_STARTED](./GETTING_STARTED.md).
6+
7+
## :rocket: How to use it
8+
9+
This repository provides a reusable GitHub Actions Workflow to analyze code. The workflow is defined in [public-analyze-code-graph.yml](./.github/workflows/public-analyze-code-graph.yml).
10+
11+
The main idea is to have three workflow jobs:
12+
13+
1. **Collect source code and build artifacts**: Gather the source code and any build artifacts.
14+
2. **Run the analysis**: Use the reusable workflow to analyze the collected code and artifacts.
15+
3. **Download the reports**: Retrieve the analysis reports generated by the workflow.
16+
17+
The workflow requires the names of the uploaded artifacts (source code and build artifacts) and provides the names of the artifact containing the analysis results for download.
18+
19+
You can find examples in:
20+
21+
- [internal-java-code-analysis.yml](./.github/workflows/internal-java-code-analysis.yml)
22+
- [internal-typescript-code-analysis.yml](./.github/workflows/internal-typescript-code-analysis.yml)
23+
24+
:warning: Note: Workflows with names starting with `internal-` are private and should not be used outside this repository. They may change at any time without notice.
25+
26+
## :gear: Parameters
27+
28+
The workflow parameters are as follows:
29+
30+
- **analysis-name**: The name of the project to analyze. Example: MyProject-1.0.0. This parameter is required and should be a string.
31+
- **artifacts-upload-name**: The name of the artifacts uploaded with [actions/upload-artifact](https://github.com/actions/upload-artifact/tree/65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08) containing the content of the 'artifacts' directory for the analysis. This is used to analyze Java JARs, WARs, EARs, etc. This parameter is optional and defaults to an empty string.
32+
- **sources-upload-name**: The name of the sources uploaded with [actions/upload-artifact](https://github.com/actions/upload-artifact/tree/65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08) containing the content of the 'source' directory for the analysis. It also supports sub-folders for multiple source code bases. This parameter is optional and defaults to an empty string.
33+
- **ref**: The branch, tag, or SHA of the code-graph-analysis-pipeline to checkout. This parameter is optional and defaults to "main".
34+
- **analysis-arguments**: The arguments to pass to the analysis script. This parameter is optional and defaults to '--profile Neo4jv5-low-memory'.
35+
- **typescript-scan-heap-memory**: The heap memory size in MB to use for the TypeScript code scans. This value is only used for the TypeScript code scans and is ignored for other scans. This parameter is optional and defaults to '4096'.
36+
37+
The workflow also provides an output parameter:
38+
39+
- **uploaded-analysis-results**: The name of the artifact uploaded with 'actions/upload-artifact' containing all analysis

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Contained within this repository is a comprehensive and automated code graph ana
1414
- Fully automated [pipeline for Java](./.github/workflows/java-code-analysis.yml) from tool installation to report generation
1515
- Fully automated [pipeline for Typescript](./.github/workflows/typescript-code-analysis.yml) from tool installation to report generation
1616
- Fully automated [local run](./GETTING_STARTED.md)
17+
- Easy integratable in your [continuous integration pipeline](./INTEGRATION.md)
1718
- More than 130 CSV reports for dependencies, metrics, cycles, annotations, algorithms and many more
1819
- Jupyter notebook reports for dependencies, metrics, visibility and many more
1920
- Graph structure visualization
@@ -105,6 +106,11 @@ This could be as simple as running the following command in your Typescript proj
105106

106107
See [GETTING_STARTED.md](./GETTING_STARTED.md) on how to get started on your local machine.
107108

109+
## :rocket: Integration
110+
111+
See [INTEGRATION.md](./INTEGRATION.md) on how to integrate code analysis in your continuous integration pipeline.
112+
Currently (2025), only GitHub Actions are supported.
113+
108114
## :building_construction: Pipeline and Tools
109115

110116
The [Code Structure Analysis Pipeline](./.github/workflows/java-code-analysis.yml) utilizes [GitHub Actions](https://docs.github.com/de/actions) to automate the whole analysis process:

0 commit comments

Comments
 (0)