fix(runtime): add root scope id to the user provided nested children as classname #6454
Workflow file for this run
This file contains 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: Tech Debt Burndown | |
# this workflow is for reporting on various metrics for the codebase that | |
# we want to pay attention to. Generally these are checks of some sort that we'll | |
# want to eventually 'graduate' to full CI checks (which cause builds to fail if | |
# there are any errors) once we've eliminated all the problems, but until that | |
# point we run them here, separate from the main build, and write a report on our | |
# progress on them to each PR. | |
on: | |
pull_request_target: | |
branches: | |
- '**' | |
jobs: | |
strict_null_check: # TODO(STENCIL-446): Remove this workflow once `strictNullChecks` is enabled | |
strategy: | |
matrix: | |
branch: ['main', 'pr'] | |
name: 'Get strictNullChecks errors on ${{ matrix.branch }}' | |
runs-on: 'ubuntu-22.04' | |
steps: | |
- name: Checkout main | |
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 | |
with: | |
ref: main | |
if: ${{ matrix.branch == 'main' }} | |
- name: Checkout PR branch | |
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 | |
with: | |
# the pull_request_target event will consider the HEAD of `main` to be the SHA to use. | |
# attempt to use the SHA associated with a pull request and fallback to HEAD of `main` | |
ref: ${{ github.event_name == 'pull_request_target' && format('refs/pull/{0}/merge', github.event.number) || '' }} | |
persist-credentials: false | |
if: ${{ matrix.branch == 'pr' }} | |
- name: Get Core Dependencies | |
uses: ./.github/workflows/actions/get-core-dependencies | |
- name: Install tsc-output-parser | |
run: npm install @aivenio/[email protected] | |
- name: Run Typescript compiler and generate JSON-formatted error file | |
run: npx tsc --strictNullChecks --noEmit --pretty false | npx tsc-output-parser > null_errors_${{ matrix.branch }}.json | |
- name: Upload null_errors_${{ matrix.branch }}.json | |
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | |
with: | |
name: null_errors_${{ matrix.branch }} | |
path: 'null_errors_${{ matrix.branch }}.json' | |
# TODO(STENCIL-454): Remove or change this up once we've eliminated unused exports | |
unused_exports_check: | |
strategy: | |
matrix: | |
branch: ['main', 'pr'] | |
name: Find unused variables on ${{ matrix.branch }} | |
runs-on: 'ubuntu-22.04' | |
steps: | |
- name: Checkout main | |
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 | |
with: | |
ref: main | |
if: ${{ matrix.branch == 'main' }} | |
- name: Checkout PR branch | |
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 | |
with: | |
# the pull_request_target event will consider the HEAD of `main` to be the SHA to use. | |
# attempt to use the SHA associated with a pull request and fallback to HEAD of `main` | |
ref: ${{ github.event_name == 'pull_request_target' && format('refs/pull/{0}/merge', github.event.number) || '' }} | |
persist-credentials: false | |
if: ${{ matrix.branch == 'pr' }} | |
- name: Install ts-prune | |
run: npm install [email protected] | |
- name: Run ts-prune and write output to disk | |
run: npx ts-prune > unused-exports-${{ matrix.branch }}.txt | |
- name: Upload unused exports | |
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | |
with: | |
name: unused-exports-${{ matrix.branch }} | |
path: 'unused-exports-${{ matrix.branch }}.txt' | |
format_report: | |
needs: ['strict_null_check', 'unused_exports_check'] | |
name: Download error files and report | |
runs-on: 'ubuntu-22.04' | |
steps: | |
- name: Checkout current branch | |
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 | |
with: | |
# the pull_request_target event will consider the HEAD of `main` to be the SHA to use. | |
# attempt to use the SHA associated with a pull request and fallback to HEAD of `main` | |
ref: ${{ github.event_name == 'pull_request_target' && format('refs/pull/{0}/merge', github.event.number) || '' }} | |
persist-credentials: false | |
- name: Get Core Dependencies | |
uses: ./.github/workflows/actions/get-core-dependencies | |
# TODO(STENCIL-446): Remove this workflow once `strictNullChecks` is enabled | |
- name: Download null errors file for main branch | |
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 | |
with: | |
name: null_errors_main | |
# TODO(STENCIL-446): Remove this workflow once `strictNullChecks` is enabled | |
- name: Download null errors file for PR | |
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 | |
with: | |
name: null_errors_pr | |
# TODO(STENCIL-454): Remove or change this up once we've eliminated unused exports | |
- name: Download unused exports for main | |
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 | |
with: | |
name: unused-exports-main | |
# TODO(STENCIL-454): Remove or change this up once we've eliminated unused exports | |
- name: Download unused exports for PR | |
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 | |
with: | |
name: unused-exports-pr | |
- name: Compile scripts | |
run: npm run tsc.scripts | |
- name: Set action output | |
run: node scripts/build/tech-debt-burndown-report.js > $GITHUB_STEP_SUMMARY | |
# for syntax information, see https://github.com/peter-evans/create-or-update-comment#setting-the-comment-body-from-a-file | |
- name: Set comment body | |
id: set-comment-body | |
# GitHub - "Warning: Make sure the delimiter you're using is randomly generated and unique for each run. | |
# For more information, see https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#understanding-the-risk-of-script-injections" | |
run: | | |
body=$(node scripts/build/tech-debt-burndown-report.js) | |
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) | |
echo "body<<$EOF" >> $GITHUB_OUTPUT | |
echo "$body" >> $GITHUB_OUTPUT | |
echo "$EOF" >> $GITHUB_OUTPUT | |
- name: Find Comment | |
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e # v3.1.0 | |
id: fc | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
comment-author: 'github-actions[bot]' | |
body-includes: '### `--strictNullChecks` error report' | |
- name: Create or update comment | |
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0 | |
with: | |
comment-id: ${{ steps.fc.outputs.comment-id }} | |
issue-number: ${{ github.event.pull_request.number }} | |
body: ${{ steps.set-comment-body.outputs.body }} | |
edit-mode: replace |