Skip to content

Commit 7a44b55

Browse files
committed
Merge branch 'v4' into fix/fix-svg-loader-storybook
2 parents 2fce72e + a5819ba commit 7a44b55

File tree

3 files changed

+75
-16
lines changed

3 files changed

+75
-16
lines changed

.codeclimate.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# https://docs.codeclimate.com/docs/default-analysis-configuration
2+
# https://docs.codeclimate.com/docs/advanced-configuration
3+
4+
version: '2'
5+
checks:
6+
argument-count:
7+
config:
8+
threshold: 6
9+
complex-logic:
10+
config:
11+
threshold: 10
12+
file-lines:
13+
config:
14+
threshold: 500
15+
method-complexity:
16+
config:
17+
threshold: 10
18+
method-lines:
19+
config:
20+
threshold: 250
21+
# https://docs.codeclimate.com/docs/default-analysis-configuration#per-language-mass-threshold-defaults
22+
similar-code:
23+
config:
24+
threshold: 50
25+
identical-code:
26+
config:
27+
threshold: 50
28+
29+
exclude_patterns:
30+
- 'config/'
31+
- 'db/'
32+
- 'dist/'
33+
- 'features/'
34+
- '**/node_modules/'
35+
- 'script/'
36+
- '**/spec/'
37+
- '**/test/'
38+
- '**/tests/'
39+
- 'Tests/'
40+
- '**/vendor/'
41+
- '**/*_test.go'
42+
- '**/*.d.ts'
43+
- '**/*.stories.tsx'
44+
- '**/*.test.tsx'

.github/workflows/ci.yml

+29-15
Original file line numberDiff line numberDiff line change
@@ -72,21 +72,35 @@ jobs:
7272
name: coverage-${{ runner.os }}
7373
path: coverage/
7474

75-
# coverage:
76-
# runs-on: ubuntu-latest
77-
# needs: [test]
78-
# if: ${{ success() && github.actor != 'dependabot[bot]' }}
79-
# steps:
80-
# - uses: actions/checkout@v2
81-
# - uses: actions/download-artifact@v2
82-
# with:
83-
# name: coverage-${{ runner.os }}
84-
85-
# - uses: paambaati/codeclimate-action@v3.0.0
86-
# env:
87-
# CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
88-
# with:
89-
# debug: true
75+
coverage:
76+
runs-on: ubuntu-latest
77+
needs: [test]
78+
if: ${{ success() && github.actor != 'dependabot[bot]' }}
79+
80+
steps:
81+
- uses: actions/checkout@v2
82+
- uses: actions/setup-node@v2
83+
with:
84+
node-version: '16'
85+
- name: Cache node_modules
86+
uses: actions/cache@v2
87+
env:
88+
cache-name: cache-node-modules
89+
with:
90+
path: ~/.npm
91+
key: ${{ runner.os }}-coverage-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
92+
restore-keys: ${{ runner.os }}-coverage-${{ env.cache-name }}-
93+
94+
- uses: actions/download-artifact@v2
95+
with:
96+
name: coverage-${{ runner.os }}
97+
98+
- run: npm ci
99+
- run: npm run codegen:apollo
100+
101+
- uses: paambaati/codeclimate-action@v3.0.0
102+
env:
103+
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
90104

91105
storybook:
92106
runs-on: ${{ matrix.os }}

.jest/jest.config.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ const customJestConfig = {
2626
collectCoverage: true,
2727
collectCoverageFrom: [
2828
'src/**/*.{ts,tsx}',
29-
'!src/**/*.{stories,test}.{ts,tsx}'
29+
'!src/**/*.{stories,test}.{ts,tsx}',
30+
'!src/@types/**/*.{ts,tsx}'
3031
],
3132
testPathIgnorePatterns: ['node_modules', '\\.cache', '.next', 'coverage']
3233
}

0 commit comments

Comments
 (0)