fix: badges can grow #34655
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: CI-Pipeline | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - 'develop' | |
| - 'main' | |
| - 'release/*' | |
| workflow_dispatch: | |
| concurrency: | |
| group: 'workflow-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}' | |
| cancel-in-progress: true | |
| jobs: | |
| build-and-check: | |
| continue-on-error: true | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: ./.github/actions/pnpm-setup | |
| - name: Build | |
| run: pnpm -r build | |
| - name: Format | |
| run: pnpm -r format | |
| - name: Lint | |
| run: pnpm -r lint | |
| - name: Unit Tests | |
| run: pnpm -r test:unit | |
| - name: Unused | |
| run: pnpm -r unused | |
| e2e-tests: | |
| continue-on-error: true | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: ./.github/actions/pnpm-setup | |
| - name: Install Playwright browsers | |
| run: npx playwright install --with-deps chromium firefox webkit | |
| - name: E2E Test components | |
| run: pnpm --filter @public-ui/components test:e2e | |
| - name: React samples build dependencies | |
| run: pnpm --filter @public-ui/sample-react^... build | |
| - name: E2E Test react samples | |
| run: pnpm --filter @public-ui/sample-react test:e2e | |
| - uses: ./.github/actions/upload-reports | |
| if: failure() | |
| with: | |
| name: report-e2e | |
| visual-tests: | |
| continue-on-error: true | |
| strategy: | |
| matrix: | |
| package: ['test-tag-name-transformer', 'theme-bwst', 'theme-default', 'theme-kern'] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: ./.github/actions/pnpm-setup | |
| - name: Install Playwright browsers | |
| run: npx playwright install --with-deps firefox | |
| - name: Build | |
| run: pnpm --filter @public-ui/sample-react^... build | |
| - name: Visual Tests | |
| run: pnpm --filter=@public-ui/${{ matrix.package }} test | |
| - uses: ./.github/actions/upload-reports | |
| if: failure() | |
| with: | |
| name: report-${{ matrix.package }} | |
| # lighthouse: | |
| # continue-on-error: true | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - name: Checkout | |
| # uses: actions/checkout@v6 | |
| # with: | |
| # persist-credentials: false | |
| # - uses: ./.github/actions/pnpm-setup | |
| # - name: Build dependencies | |
| # run: pnpm --filter @public-ui/sample-react^... build | |
| # - name: Lighthouse CI | |
| # run: pnpm --filter @public-ui/sample-react lighthouse | |
| # - uses: actions/upload-artifact@v4 | |
| # if: always() | |
| # with: | |
| # name: lighthouse-report | |
| # path: packages/samples/react/.lighthouseci/ | |
| check-results: | |
| runs-on: ubuntu-latest | |
| needs: [build-and-check, e2e-tests, visual-tests] | |
| if: always() | |
| steps: | |
| - name: Fail if any job failed | |
| run: | | |
| if [[ "${{ needs.build-and-check.result }}" == "failure" || \ | |
| "${{ needs.e2e-tests.result }}" == "failure" || \ | |
| "${{ needs.visual-tests.result }}" == "failure" ]]; then | |
| echo "At least one job failed" | |
| exit 1 | |
| fi |