Skip to content

Commit c1053e8

Browse files
authored
💚 - Add UI CI github workflows (#38)
1 parent 59bd839 commit c1053e8

File tree

3 files changed

+45
-1
lines changed

3 files changed

+45
-1
lines changed

‎.github/workflows/ui.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: UI-claudio-coder page
2+
run-name: ${{github.actor}} is running UI-claudio-coder
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
jobs:
11+
UI-claudio-coder:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Use Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '20.x'
20+
21+
- name: Install dependencies
22+
run: npm ci
23+
24+
- name: Build
25+
run: npm run build
26+
27+
- name: Linters
28+
run: npm run lint
29+
30+
- name: Format Code
31+
run: npm run format
32+
33+
- name: Unit Test
34+
run: npm run test:coverage
35+
36+
- name: 'Report Coverage'
37+
uses: davelosert/vitest-coverage-report-action@v2

‎package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"format": "prettier --check .",
1111
"format:fix": "prettier --write .",
1212
"test": "vitest",
13-
"test:coverage": "vitest --coverage"
13+
"test:coverage": "vitest --coverage.enabled true"
1414
},
1515
"dependencies": {
1616
"@fortawesome/fontawesome-svg-core": "^6.5.1",

‎vitest.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,20 @@ export default defineConfig({
2424
environment: 'jsdom',
2525
coverage: {
2626
provider: 'v8',
27+
reporter: ['text', 'html', 'clover', 'json-summary', 'json'],
2728
exclude: [
2829
'vitest.config.ts',
2930
'**/*.config.*',
3031
'src/utils',
3132
'__mocks__',
3233
...coverageConfigDefaults.exclude,
3334
],
35+
thresholds: {
36+
lines: 80,
37+
branches: 80,
38+
functions: 80,
39+
statements: 80,
40+
},
3441
},
3542
setupFiles: ['vitest.setup.ts'],
3643
watch: false,

0 commit comments

Comments
 (0)