1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

subgraph typings generation during coverage run (#1421)

* subgraph typings generation during coverage run

* cache node_modules

* ignore src/@types/ for coverage
This commit is contained in:
Matthias Kretschmann 2022-05-16 14:38:48 +01:00 committed by GitHub
parent 065f5bc711
commit a5819bac58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 15 deletions

View File

@ -72,21 +72,35 @@ jobs:
name: coverage-${{ runner.os }} name: coverage-${{ runner.os }}
path: coverage/ path: coverage/
# coverage: coverage:
# runs-on: ubuntu-latest runs-on: ubuntu-latest
# needs: [test] needs: [test]
# if: ${{ success() && github.actor != 'dependabot[bot]' }} if: ${{ success() && github.actor != 'dependabot[bot]' }}
# steps:
# - uses: actions/checkout@v2
# - uses: actions/download-artifact@v2
# with:
# name: coverage-${{ runner.os }}
# - uses: paambaati/codeclimate-action@v3.0.0 steps:
# env: - uses: actions/checkout@v2
# CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} - uses: actions/setup-node@v2
# with: with:
# debug: true 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: storybook:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}

View File

@ -25,7 +25,8 @@ const customJestConfig = {
collectCoverage: true, collectCoverage: true,
collectCoverageFrom: [ collectCoverageFrom: [
'src/**/*.{ts,tsx}', 'src/**/*.{ts,tsx}',
'!src/**/*.{stories,test}.{ts,tsx}' '!src/**/*.{stories,test}.{ts,tsx}',
'!src/@types/**/*.{ts,tsx}'
], ],
testPathIgnorePatterns: ['node_modules', '\\.cache', '.next', 'coverage'] testPathIgnorePatterns: ['node_modules', '\\.cache', '.next', 'coverage']
} }