mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-09 14:57:59 -05:00
CI: Support uploading frontend unit test coverage. (#2772)
* CI: Support uploading frontend unit test coverage. * Add make-i18n before test. * Update vitest configuration to include only .ts and .tsx files in coverage. * remove .only in test and fix the failed tests. * Add text summary. * Move vite-tsconfig-paths to dev dep. Adjust UTs. --------- Signed-off-by: ifuryst <ifuryst@gmail.com> Co-authored-by: sp.wack <83104063+amanape@users.noreply.github.com>
This commit is contained in:
29
.github/workflows/run-unit-tests.yml
vendored
29
.github/workflows/run-unit-tests.yml
vendored
@@ -19,6 +19,35 @@ env:
|
||||
PERSIST_SANDBOX : "false"
|
||||
|
||||
jobs:
|
||||
fe-test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [20]
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: ./frontend
|
||||
run: npm ci
|
||||
|
||||
- name: Run tests and collect coverage
|
||||
working-directory: ./frontend
|
||||
run: npm run test:coverage
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v4
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
test-on-macos:
|
||||
name: Test on macOS
|
||||
runs-on: macos-12
|
||||
|
||||
Reference in New Issue
Block a user