diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index c843465..28aeef8 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -23,6 +23,7 @@ jobs: node-version: 18.x.x cache: "npm" - name: Install dependencies + id: install-dependencies run: npm ci - name: Store Playwright's Version id: store-playwright-version @@ -43,21 +44,28 @@ jobs: if: steps.cache-playwright-browsers.outputs.cache-hit != 'true' run: npx playwright install --with-deps - name: Run custom elements manifest analyzer + id: run-custom-elements-manifest-analyzer run: npm run analyze - name: Run eslint + id: run-eslint run: npm run lint - name: Run prettier + id: run-prettier run: npm run prettier - name: Run lit-analyzer + id: run-lit-analyzer run: npm run lint:lit-analyzer - name: Run tests and generate coverage run: npm run test -- --coverage --debug + id: run-tests-and-generate-coverage - name: Test tsdoc run: npm run docs + id: test-tsdoc - name: Check for modified files id: git-check run: echo "modified=$(if [ -n "$(git status --porcelain)" ]; then echo "true"; else echo "false"; fi)" >> $GITHUB_ENV - name: Update changes in GitHub repository + id: update-changes-in-github-repository env: MODIFIED: ${{ steps.git-check.outputs.modified }} if: env.MODIFIED == 'true' @@ -101,7 +109,17 @@ jobs: uses: actions/github-script@v6 with: script: | - const failedSteps = steps.git-check.filter(step => step.conclusion === 'failure'); + const failedSteps = [ + { name: 'Install dependencies', conclusion: '${{ steps.install-dependencies.outcome }}' }, + { name: 'Run custom elements manifest analyzer', conclusion: '${{ steps.run-custom-elements-manifest-analyzer.outcome }}' }, + { name: 'Run eslint', conclusion: '${{ steps.run-eslint.outcome }}' }, + { name: 'Run prettier', conclusion: '${{ steps.run-prettier.outcome }}' }, + { name: 'Run lit-analyzer', conclusion: '${{ steps.run-lit-analyzer.outcome }}' }, + { name: 'Run tests and generate coverage', conclusion: '${{ steps.run-tests-and-generate-coverage.outcome }}' }, + { name: 'Test tsdoc', conclusion: '${{ steps.test-tsdoc.outcome }}' }, + { name: 'Check for modified files', conclusion: '${{ steps.git-check.outcome }}' }, + { name: 'Update changes in GitHub repository', conclusion: '${{ steps.update-changes-in-github-repository.outcome }}' } + ].filter(step => step.conclusion === 'failure'); const failedStepsDetails = failedSteps.map(step => `- ${step.name}: ${step.conclusion}`).join('\n'); const commentBody = ` ## Code Quality Checks Failed