Update package.json #11887
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: "Frontend: PR/master build & test" | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request_target: | |
| types: ["opened", "edited", "reopened", "synchronize"] | |
| paths: | |
| - "kafka-ui-contract/**" | |
| - "kafka-ui-react-app/**" | |
| permissions: | |
| checks: write | |
| pull-requests: write | |
| jobs: | |
| build-and-test: | |
| env: | |
| CI: true | |
| NODE_ENV: dev | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| # Disabling shallow clone is recommended for improving relevancy of reporting | |
| fetch-depth: 0 | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - uses: pnpm/[email protected] | |
| with: | |
| version: 8.6.12 | |
| - name: Install node | |
| uses: actions/[email protected] | |
| with: | |
| node-version: "18.17.1" | |
| cache: "pnpm" | |
| cache-dependency-path: "./kafka-ui-react-app/pnpm-lock.yaml" | |
| - name: Install Node dependencies | |
| run: | | |
| cd kafka-ui-react-app/ | |
| pnpm install --frozen-lockfile | |
| - name: Generate sources | |
| run: | | |
| cd kafka-ui-react-app/ | |
| pnpm gen:sources | |
| - name: Linter | |
| run: | | |
| cd kafka-ui-react-app/ | |
| pnpm lint:CI | |
| - name: Tests | |
| run: | | |
| cd kafka-ui-react-app/ | |
| pnpm test:CI | |
| - name: SonarCloud Scan | |
| uses: sonarsource/sonarcloud-github-action@master | |
| with: | |
| projectBaseDir: ./kafka-ui-react-app | |
| args: -Dsonar.pullrequest.key=${{ github.event.pull_request.number }} -Dsonar.pullrequest.branch=${{ github.head_ref }} -Dsonar.pullrequest.base=${{ github.base_ref }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_FRONTEND }} |