|
42 | 42 | base_commit: ${{ github.event.pull_request.base.sha }}
|
43 | 43 | head_commit: ${{ github.event.pull_request.head.sha }}
|
44 | 44 |
|
| 45 | + check_components: |
| 46 | + name: Check component keys and app props |
| 47 | + runs-on: ubuntu-latest |
| 48 | + |
| 49 | + steps: |
| 50 | + - name: Checkout Code |
| 51 | + |
| 52 | + with: |
| 53 | + # Full git history is needed to get a proper list of changed files |
| 54 | + # within `super-linter` |
| 55 | + fetch-depth: 0 |
| 56 | + |
| 57 | + with: |
| 58 | + version: 7.33.6 |
| 59 | + - name: Get pnpm store directory |
| 60 | + id: pnpm-cache |
| 61 | + run: | |
| 62 | + echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" |
| 63 | + - uses: actions/cache@v4 |
| 64 | + name: Setup pnpm cache |
| 65 | + with: |
| 66 | + path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} |
| 67 | + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} |
| 68 | + restore-keys: | |
| 69 | + ${{ runner.os }}-pnpm-store- |
| 70 | + - name: Install dependencies |
| 71 | + run: pnpm install -r |
| 72 | + - name: Setup Node Env |
| 73 | + |
| 74 | + with: |
| 75 | + node-version: 18 |
| 76 | + registry-url: https://registry.npmjs.org/ |
| 77 | + cache: 'pnpm' |
| 78 | + - name: Compile TypeScript |
| 79 | + run: npm run build |
| 80 | + - name: Get Changed Files |
| 81 | + id: changed_files |
| 82 | + uses: jitterbit/get-changed-files@v1 |
| 83 | + with: |
| 84 | + format: 'csv' |
| 85 | + - name: Check component keys |
| 86 | + run: node scripts/findBadKeys.js ${{ steps.changed_files.outputs.added_modified }} ${{ steps.changed_files.outputs.renamed }} |
| 87 | + - name: Check component app prop |
| 88 | + run: node scripts/checkComponentAppProp.js ${{ steps.changed_files.outputs.added_modified }} ${{ steps.changed_files.outputs.renamed }} |
| 89 | + - name: Check for duplicate component keys |
| 90 | + run: node scripts/findDuplicateKeys.js |
| 91 | + |
45 | 92 | verify-typescript-components:
|
46 | 93 | name: Verify TypeScript components
|
47 | 94 | runs-on: ubuntu-latest
|
|
0 commit comments