Skip to content

Commit

Permalink
💚 - Add UI CI github workflows (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiocoder authored Jun 2, 2024
1 parent 59bd839 commit c1053e8
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/ui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: UI-claudio-coder page
run-name: ${{github.actor}} is running UI-claudio-coder
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
UI-claudio-coder:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Linters
run: npm run lint

- name: Format Code
run: npm run format

- name: Unit Test
run: npm run test:coverage

- name: 'Report Coverage'
uses: davelosert/vitest-coverage-report-action@v2
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"format": "prettier --check .",
"format:fix": "prettier --write .",
"test": "vitest",
"test:coverage": "vitest --coverage"
"test:coverage": "vitest --coverage.enabled true"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.5.1",
Expand Down
7 changes: 7 additions & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,20 @@ export default defineConfig({
environment: 'jsdom',
coverage: {
provider: 'v8',
reporter: ['text', 'html', 'clover', 'json-summary', 'json'],
exclude: [
'vitest.config.ts',
'**/*.config.*',
'src/utils',
'__mocks__',
...coverageConfigDefaults.exclude,
],
thresholds: {
lines: 80,
branches: 80,
functions: 80,
statements: 80,
},
},
setupFiles: ['vitest.setup.ts'],
watch: false,
Expand Down

0 comments on commit c1053e8

Please sign in to comment.