diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 998a91b3e767..5f75874b5de6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -238,4 +238,30 @@ jobs: steps: - name: Check AVT Runner job status if: ${{ needs.avt-runner.result != 'success' }} - run: exit 1 \ No newline at end of file + run: exit 1 + on: + push: + paths: + - "packages/react/src/components/**" +jobs: + build: + runs-on: ubuntu-latest + name: Test JS frontend + defaults: + run: + working-directory: ./packages/react/src/components + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v2 + with: + node-version: "20" + - name: Install requirements + run: npm install + - name: Run tests and collect coverage + run: npm run test + - name: Upload coverage reports to Codecov with GitHub Action + uses: codecov/codecov-action@v4.2.0 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + with: + flags: jest-components diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 000000000000..2e5ca9e1a54e --- /dev/null +++ b/codecov.yml @@ -0,0 +1,16 @@ +coverage: + status: + project: off + patch: off + +flag_management: + default_rules: + carryforward: true + individual_flags: + - name: jest-components + paths: + - packages/react/src/components/ + statuses: + - type: project + target: auto + threshold: 1%