Generate analysis results references documentation #91
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: react-router Code Graph Analysis (TypeScript) | |
| on: | |
| push: | |
| branches: | |
| - main | |
| # Ignore changes in documentation, general configuration and analysis-results for push events | |
| paths-ignore: | |
| - 'analysis-results/**' | |
| - 'documentation/**' | |
| - '**/*.md' | |
| - '**/*.txt' | |
| - '**/*.css' | |
| - '**/*.html' | |
| - '**/*.js' | |
| - '.gitignore' | |
| - '.gitattributes' | |
| - 'renovate.json' | |
| - '**.code-workspace' | |
| - '.github/workflows/java-code-analysis.yml' | |
| - '.github/workflows/*documentation.yml' | |
| pull_request: | |
| branches: | |
| - main | |
| # Ignore changes in documentation, general configuration and analysis-results for pull request events | |
| paths-ignore: | |
| - 'analysis-results/**' | |
| - 'documentation/**' | |
| - '**/*.md' | |
| - '**/*.txt' | |
| - '**/*.css' | |
| - '**/*.html' | |
| - '**/*.js' | |
| - '.gitignore' | |
| - '.gitattributes' | |
| - 'renovate.json' | |
| - '**.code-workspace' | |
| - '.github/workflows/java-code-analysis.yml' | |
| - '.github/workflows/*documentation.yml' | |
| jobs: | |
| prepare-code-to-analyze: | |
| name: Prepare Code to Analyze | |
| runs-on: ubuntu-latest | |
| outputs: | |
| project-name: ${{ env.PROJECT_NAME }} | |
| analysis-name: ${{ steps.set-analysis-name.outputs.analysis-name }} | |
| sources-upload-name: ${{ steps.set-sources-upload-name.outputs.sources-upload-name }} | |
| env: | |
| PROJECT_NAME: react-router | |
| # Version variable name matches renovate.json configuration entry | |
| REACT_ROUTER_VERSION: 6.28.1 | |
| steps: | |
| - name: (Prepare Code to Analyze) Checkout react-router repository | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
| with: | |
| repository: remix-run/react-router | |
| ref: react-router@${{ env.REACT_ROUTER_VERSION }} | |
| fetch-depth: 0 # Include the full git history for enhanced analysis | |
| - name: (Prepare Code to Analyze) Setup pnpm for react-router | |
| uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 | |
| - name: (Prepare Code to Analyze) Install dependencies with pnpm | |
| run: pnpm install --frozen-lockfile --strict-peer-dependencies | |
| - name: (Prepare Code to Analyze) Set analysis-name | |
| id: set-analysis-name | |
| run: echo "analysis-name=${{ env.PROJECT_NAME }}-${{ env.REACT_ROUTER_VERSION }}" >> "$GITHUB_OUTPUT" | |
| - name: (Prepare Code to Analyze) Generate ARTIFACT_UPLOAD_ID | |
| shell: bash | |
| 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) Upload code to analyze | |
| if: success() | |
| uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4 | |
| with: | |
| name: ${{ steps.set-sources-upload-name.outputs.sources-upload-name }} | |
| path: . | |
| include-hidden-files: true | |
| if-no-files-found: error | |
| retention-days: 1 | |
| analyze-code-graph: | |
| name: Analyze Code Graph | |
| needs: [prepare-code-to-analyze] | |
| uses: JohT/code-graph-analysis-pipeline/.github/workflows/public-analyze-code-graph.yml@4d0f780dbd529047f581d91d6b1f034c237686ce # main | |
| with: | |
| analysis-name: ${{ needs.prepare-code-to-analyze.outputs.analysis-name }} | |
| sources-upload-name: ${{ needs.prepare-code-to-analyze.outputs.sources-upload-name }} | |
| ref: 4d0f780dbd529047f581d91d6b1f034c237686ce # main | |
| commit-analysis-results: | |
| name: Commit Analysis Results | |
| needs: [prepare-code-to-analyze, analyze-code-graph] | |
| uses: ./.github/workflows/internal-commit-results.yml | |
| with: | |
| commit-author-name: "${{ github.event.repository.name }} Continuous Integration" | |
| commit-author-email: "7671054+JohT@users.noreply.github.com" | |
| commit-message: "Automated code structure analysis results (CI)" | |
| commit-directory: "analysis-results/${{ needs.prepare-code-to-analyze.outputs.project-name }}/${{ needs.prepare-code-to-analyze.outputs.analysis-name }}" | |
| uploaded-artifact-name: ${{ needs.analyze-code-graph.outputs.uploaded-analysis-results }} | |
| secrets: | |
| repository-commit-token: ${{ secrets.WORKFLOW_GIT_ACCESS_TOKEN }} |