Skip to content

Commit 491df53

Browse files
authored
Feat/add UI tests (#20)
* feat: add icons ui tests * test: add closed sidebar * ci: add example coverage * ci: add coverage example * ci: revert error * ci: update coverage configuration to include lcov reporter * test: add unit tests for TestListItem component and its styles * test: add test list component * test: add cli tests * test: cover more lines in cli * fix: mock error import
1 parent b70110f commit 491df53

23 files changed

Lines changed: 745 additions & 61 deletions

.github/workflows/ci.yml

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
pull_request:
1010
branches: [main]
1111

12+
permissions:
13+
contents: read
14+
id-token: write # Required for OIDC
15+
1216
jobs:
1317
test:
1418
runs-on: ubuntu-latest
@@ -30,19 +34,27 @@ jobs:
3034

3135
- name: Run Vitest
3236
run: npm run test:ci
33-
# coverage:
34-
# name: coverage
35-
# runs-on: ubuntu-latest
36-
# steps:
37-
# - uses: actions/checkout@master
38-
# - uses: actions/setup-node@master
39-
# with:
40-
# node-version: '20'
41-
# - run: npm ci
42-
# - uses: paambaati/codeclimate-action@v2.6.0
43-
# env:
44-
# CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
45-
# with:
46-
# coverageCommand: npm test -- --coverage
47-
# coverageLocations: |
48-
# ${{github.workspace}}/coverage/lcov.info:lcov
37+
38+
coverage:
39+
runs-on: ubuntu-latest
40+
steps:
41+
- name: Checkout repo
42+
uses: actions/checkout@v5
43+
44+
- name: Setup Node.js
45+
uses: actions/setup-node@v5
46+
with:
47+
node-version: 24.x
48+
cache: npm
49+
50+
- name: Install dependencies
51+
run: npm ci
52+
53+
- name: Run Vitest
54+
run: npm run test:ci
55+
56+
- name: Upload coverage to Qlty
57+
uses: qltysh/qlty-action/coverage@v2
58+
with:
59+
oidc: true
60+
files: coverage/lcov.info

0 commit comments

Comments
 (0)