Skip to content

Add git history file overview treemap #78

Add git history file overview treemap

Add git history file overview treemap #78

name: Java Code Structure Graph Analysis
on:
push:
branches:
- main
# Ignore changes in documentation, general configuration and reports for push events
paths-ignore:
- '**/*.md'
- '**/*.txt'
- '**/*.css'
- '**/*.html'
- '**/*.js'
- '.gitignore'
- '.gitattributes'
- 'renovate.json'
- 'renovate-presets/**'
- 'changelogTemplate.mustache'
- '**.code-workspace'
- '.github/workflows/internal-typescript-code-analysis.yml'
- '.github/workflows/*documentation.yml'
pull_request:
branches:
- main
# Ignore changes in documentation, general configuration and reports for pull request events
paths-ignore:
- '**/*.md'
- '**/*.txt'
- '**/*.css'
- '**/*.html'
- '**/*.js'
- '.gitignore'
- '.gitattributes'
- 'renovate.json'
- 'renovate-presets/**'
- 'changelogTemplate.mustache'
- '**.code-workspace'
- '.github/workflows/internal-typescript-code-analysis.yml'
- '.github/workflows/*documentation.yml'
# Requires the secret NEO4J_INITIAL_PASSWORD to be configured
jobs:
prepare-code-to-analyze:
runs-on: ubuntu-latest
outputs:
analysis-name: ${{ steps.set-analysis-name.outputs.analysis-name }}
sources-upload-name: ${{ steps.set-sources-upload-name.outputs.sources-upload-name }}
artifacts-upload-name: ${{ steps.set-artifacts-upload-name.outputs.artifacts-upload-name }}
env:
PROJECT_NAME: AxonFramework
# Version variable names matches renovate.json configuration entry
AXON_FRAMEWORK_VERSION: 4.10.3
steps:
- name: Checkout GIT Repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set Set output variable 'analysis-name'
id: set-analysis-name
run: echo "analysis-name=${{ env.PROJECT_NAME }}-${{ env.AXON_FRAMEWORK_VERSION }}" >> "$GITHUB_OUTPUT"
- name: Setup temp directory if missing
run: mkdir -p ./temp
- name: Download ${{ steps.set-analysis-name.outputs.analysis-name }}
working-directory: temp
run: |
mkdir -p ${{ steps.set-analysis-name.outputs.analysis-name }}
cd ${{ steps.set-analysis-name.outputs.analysis-name }}
echo "Working directory: $( pwd -P )"
./../../scripts/downloader/downloadAxonFramework.sh ${{ env.AXON_FRAMEWORK_VERSION }}
- name: Debug folder structure in temp directory
if: runner.debug == '1'
working-directory: temp
run: |
ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'
- name: (Prepare Code to Analyze) Generate ARTIFACT_UPLOAD_ID
run: echo "ARTIFACT_UPLOAD_ID=$(LC_ALL=C tr -dc 'A-Za-z0-9' < /dev/urandom | head -c 10)" >> $GITHUB_ENV
- name: (Prepare Code to Analyze) Set sources-upload-name
id: set-sources-upload-name
run: echo "sources-upload-name=${{ steps.set-analysis-name.outputs.analysis-name }}-analysis-sources_input-${{ env.ARTIFACT_UPLOAD_ID }}" >> "$GITHUB_OUTPUT"
- name: (Prepare Code to Analyze) Set output variable 'artifacts-upload-name'
id: set-artifacts-upload-name
run: echo "artifacts-upload-name=${{ steps.set-analysis-name.outputs.analysis-name }}-analysis-artifacts-input-${{ env.ARTIFACT_UPLOAD_ID }}" >> "$GITHUB_OUTPUT"
- name: (Prepare Code to Analyze) Upload sources to analyze
if: success()
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
with:
name: ${{ steps.set-sources-upload-name.outputs.sources-upload-name }}
path: ./temp/${{ steps.set-analysis-name.outputs.analysis-name }}/source
include-hidden-files: true
if-no-files-found: error
retention-days: 1
- name: (Prepare Code to Analyze) Upload artifacts to analyze
if: success()
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
with:
name: ${{ steps.set-artifacts-upload-name.outputs.artifacts-upload-name }}
path: ./temp/${{ steps.set-analysis-name.outputs.analysis-name }}/artifacts
if-no-files-found: error
retention-days: 1
analyze-code-graph:
needs: [prepare-code-to-analyze]
uses: ./.github/workflows/public-analyze-code-graph.yml
with:
analysis-name: ${{ needs.prepare-code-to-analyze.outputs.analysis-name }}
artifacts-upload-name: ${{ needs.prepare-code-to-analyze.outputs.artifacts-upload-name }}
sources-upload-name: ${{ needs.prepare-code-to-analyze.outputs.sources-upload-name }}