Skip to content

Commit

Permalink
feat: configure ci with codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
Gumball12 committed Feb 25, 2024
1 parent f1cf536 commit 1bb290c
Show file tree
Hide file tree
Showing 4 changed files with 230 additions and 1 deletion.
42 changes: 42 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: ci

on:
push:
pull_request:
branches:
- main

jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20

- uses: pnpm/[email protected]
with:
version: 8

- uses: actions/cache@v3
id: pnpm-cache
with:
path: node_modules
key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- if: steps.pnpm-cache.outputs.cache-hit != 'true'
run: pnpm install

- run: pnpm run lint
- run: pnpm run build
- run: pnpm run test

- uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage
fail_ci_if_error: true
verbose: true
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
coverage

# Logs
logs
*.log
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
"scripts": {
"build": "tsc && vite build",
"lint": "eslint --ext .ts ./**/src/**.ts",
"test": "vitest run",
"test": "vitest run --coverage",
"prepare": "husky"
},
"devDependencies": {
"@types/node": "^20.11.20",
"@typescript-eslint/eslint-plugin": "^7.0.2",
"@typescript-eslint/parser": "^7.0.2",
"@vitest/coverage-v8": "^1.3.1",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
Expand Down
184 changes: 184 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1bb290c

Please sign in to comment.