@@ -61,69 +61,23 @@ jobs:
6161 with :
6262 token : ${{ secrets.WORKFLOW_GIT_ACCESS_TOKEN }}
6363
64- - name : Checkout code-graph-analysis-pipeline
65- uses : actions/checkout@v4
66- with :
67- repository : JohT/code-graph-analysis-pipeline
68- ref : 41f3e22b5bd65351474dd23effeee91fab849a12
69- path : code-graph-analysis-pipeline
70- persist-credentials : false
64+ - name : (Code Analysis Setup) Set ANALYSIS_NAME
65+ run : echo "ANALYSIS_NAME=${{ env.PROJECT_NAME }}-${{ env.AXON_FRAMEWORK_VERSION }}" >> $GITHUB_ENV
7166
72- - name : (Java Setup) Use Java Development Kit (JDK) ${{ matrix.java }}
73- uses : actions/setup-java@v4
67+ - name : Setup Code Analysis
68+ uses : ./.github/ actions/setup-code-analysis
7469 with :
75- distribution : ' adopt'
7670 java-version : ${{ matrix.java }}
77-
78- # "Setup Python" can be skipped if jupyter notebook analysis-results aren't needed
79- - name : (Python Setup) Setup Cache for Conda package manager Miniforge
80- uses : actions/cache@v4
81- env :
82- # Increase this value to reset cache if etc/example-environment.yml has not changed
83- # Reference: https://github.com/conda-incubator/setup-miniconda#caching
84- CACHE_NUMBER : 0
85- with :
86- path : ~/conda_pkgs_dir
87- key :
88- ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-environments-${{hashFiles('**/environment.yml', '.github/workflows/*.yml') }}
89- - name : (Python Setup) Use version ${{ matrix.python }} with Conda package manager Miniforge
90- uses : conda-incubator/setup-miniconda@v3
91- with :
9271 python-version : ${{ matrix.python }}
9372 miniforge-version : ${{ matrix.miniforge }}
94- activate-environment : codegraph
95- environment-file : ./code-graph-analysis-pipeline/jupyter/environment.yml
96- auto-activate-base : false
97- use-only-tar-bz2 : true # IMPORTANT: This needs to be set for caching to work properly!
98- - name : (Python Setup) Conda environment info
99- shell : bash -el {0}
100- run : conda info
73+ analysis-name : ${{ env.ANALYSIS_NAME }}
74+ neo4j-password : ${{ secrets.NEO4J_INITIAL_PASSWORD }}
10175
102- - name : (Code Analysis Setup) Add code-graph-analysis-pipeline temporarily to .gitignore
103- run : |
104- echo "" >> .gitignore
105- echo "# Code Graph Analysis Pipeline" >> .gitignore
106- echo "code-graph-analysis-pipeline/" >> .gitignore
107- - name : (Code Analysis Setup) Set ANALYSIS_NAME
108- run : echo "ANALYSIS_NAME=${{ env.PROJECT_NAME }}-${{ env.AXON_FRAMEWORK_VERSION }}" >> $GITHUB_ENV
109- - name : (Code Analysis Setup) Generate NEO4J_INITIAL_PASSWORD
110- run : echo "NEO4J_INITIAL_PASSWORD=$(LC_ALL=C tr -dc 'A-Za-z0-9!?%=' < /dev/urandom | head -c 10)" >> $GITHUB_ENV
111- - name : (Code Analysis Setup) Setup Cache Analysis Downloads
112- uses : actions/cache@v4
113- with :
114- path : ./code-graph-analysis-pipeline/temp/downloads
115- key :
116- ${{ runner.os }}-${{ hashFiles('**/*.sh') }}
117-
118- - name : (Code Analysis) Initialize Analysis
119- working-directory : code-graph-analysis-pipeline
120- env :
121- NEO4J_INITIAL_PASSWORD : ${{ env.NEO4J_INITIAL_PASSWORD }}
122- run : ./init.sh ${{ env.ANALYSIS_NAME }}
12376 - name : (Code Analysis) Download ${{ env.ANALYSIS_NAME }}
12477 working-directory : code-graph-analysis-pipeline/temp/${{ env.ANALYSIS_NAME }}
12578 run : |
12679 ./../../scripts/downloader/downloadAxonFramework.sh ${{ env.AXON_FRAMEWORK_VERSION }}
80+
12781 - name : (Code Analysis) Analyze ${{ env.ANALYSIS_NAME }}
12882 working-directory : code-graph-analysis-pipeline/temp/${{ env.ANALYSIS_NAME }}
12983 # Shell type can be skipped if jupyter notebook analysis-results (and therefore conda) aren't needed
13488 IMPORT_GIT_LOG_DATA_IF_SOURCE_IS_PRESENT : " " # Options: "none", "aggregated", "full". default = "plugin" or ""
13589 run : |
13690 ./../../scripts/analysis/analyze.sh --profile Neo4jv5-low-memory
91+
13792 - name : (Code Analysis) Collect analysis results
13893 working-directory : code-graph-analysis-pipeline/temp/${{ env.ANALYSIS_NAME }}
13994 run : |
@@ -175,7 +130,7 @@ jobs:
175130 # Commit and push the native image agent analysis-results
176131 - name : Display environment variable "github.event_name"
177132 run : echo "github.event_name=${{ github.event_name }}"
178- - name : Commit "analysis-results" directory containing the analysis-results
133+ - name : Commit "analysis-results" directory
179134 # Only run when a pull request gets merged or a commit is pushed to the main branch
180135 # git add parameters need to match paths-ignore parameters above
181136 # Git pull before add/commit/push to reduce race conditions on parallel builds
0 commit comments