Skip to content

Commit

Permalink
subgraph typings generation during coverage run (#1421)
Browse files Browse the repository at this point in the history
* subgraph typings generation during coverage run

* cache node_modules

* ignore src/@types/ for coverage
  • Loading branch information
kremalicious authored May 16, 2022
1 parent 065f5bc commit a5819ba
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 16 deletions.
44 changes: 29 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

# - uses: paambaati/[email protected]
# env:
# CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
# with:
# debug: true
coverage:
runs-on: ubuntu-latest
needs: [test]
if: ${{ success() && github.actor != 'dependabot[bot]' }}

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/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}

storybook:
runs-on: ${{ matrix.os }}
Expand Down
3 changes: 2 additions & 1 deletion .jest/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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']
}
Expand Down

0 comments on commit a5819ba

Please sign in to comment.