Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

πŸ”€ DeepSource AI 적용 #58

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .deepsource.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version = 1

[[analyzers]]
name = "javascript"
enabled = true

[analyzers.meta]
environment = ["nodejs"]
style_guide = "airbnb"

[[analyzers]]
name = "test-coverage"
enabled = true

[[transformers]]
name = "prettier"
enabled = true
40 changes: 40 additions & 0 deletions .github/workflows/deepsource.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: DeepSource Code Review

on:
pull_request:
types: [opened, synchronize]

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '18'

- name: Install dependencies
run: npm ci

- name: Run linter
run: npm run lint

- name: Run tests and generate coverage
run: npm test -- --coverage

- name: Upload coverage to DeepSource
uses: deepsourcelabs/test-coverage-action@master
with:
key: javascript
coverage-file: ./coverage/lcov.info
dsn: ${{ secrets.DEEPSOURCE_DSN }}

- name: DeepSource Analyze
uses: deepsourcelabs/analyze-action@v1
with:
dsn: ${{ secrets.DEEPSOURCE_DSN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ yarn-error.log*
*.tsbuildinfo
next-env.d.ts

*storybook.log
# storybook
*storybook.log
10 changes: 10 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
collectCoverage: true,
coverageReporters: ['lcov', 'text'],
coverageDirectory: 'coverage',
testEnvironment: 'jsdom',
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
},
};
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"prepare": "husky",
"postinstall": "husky install",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
"build-storybook": "storybook build",
"test": "jest --coverage"
},
"dependencies": {
"@tanstack/react-query": "^5.59.14",
Expand Down
Loading