diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67956aec5..84fb0a0ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,21 +72,35 @@ jobs: name: coverage-${{ runner.os }} path: coverage/ - # coverage: - # runs-on: ubuntu-latest - # needs: [test] - # if: ${{ success() && github.actor != 'dependabot[bot]' }} - # steps: - # - uses: actions/checkout@v2 - # - uses: actions/download-artifact@v2 - # with: - # name: coverage-${{ runner.os }} + coverage: + runs-on: ubuntu-latest + needs: [test] + if: ${{ success() && github.actor != 'dependabot[bot]' }} - # - uses: paambaati/codeclimate-action@v3.0.0 - # env: - # CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} - # with: - # debug: true + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: '16' + - name: Cache node_modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + with: + path: ~/.npm + key: ${{ runner.os }}-coverage-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: ${{ runner.os }}-coverage-${{ env.cache-name }}- + + - uses: actions/download-artifact@v2 + with: + name: coverage-${{ runner.os }} + + - run: npm ci + - run: npm run codegen:apollo + + - uses: paambaati/codeclimate-action@v3.0.0 + env: + CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} storybook: runs-on: ${{ matrix.os }} diff --git a/.jest/jest.config.js b/.jest/jest.config.js index 84988619f..d75f75d26 100644 --- a/.jest/jest.config.js +++ b/.jest/jest.config.js @@ -25,7 +25,8 @@ const customJestConfig = { collectCoverage: true, collectCoverageFrom: [ 'src/**/*.{ts,tsx}', - '!src/**/*.{stories,test}.{ts,tsx}' + '!src/**/*.{stories,test}.{ts,tsx}', + '!src/@types/**/*.{ts,tsx}' ], testPathIgnorePatterns: ['node_modules', '\\.cache', '.next', 'coverage'] }