From 9732ebd7c89a8f3c3bab1e4c904a63521c2ee6db Mon Sep 17 00:00:00 2001 From: kmkzt Date: Mon, 22 Jun 2020 22:35:34 +0900 Subject: [PATCH] chore: update github actions --- .github/workflows/gh-pages.yml | 4 +--- .github/workflows/test.yml | 23 ++++++++++------------- jest.config.js | 2 +- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index af12c97fd..d2f02fdd5 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -14,11 +14,9 @@ jobs: uses: actions/setup-node@v1 with: node-version: 12.13.0 - - name: install - run: | - yarn install - name: Build run: | + yarn install --frozen-lockfile yarn demo - name: Deploy uses: peaceiris/actions-gh-pages@v3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 47c464cf8..9e1c1c0e4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,19 +30,16 @@ jobs: key: nodeModules-${{ hashFiles('**/yarn.lock') }} restore-keys: | nodeModules- - - name: Install dependencies - # TODO: add check yarn.lock - # run: yarn install --frozen-lockfile - run: yarn install + - name: install, lint, test + run: | + yarn install --frozen-lockfile + yarn lint + yarn test env: CI: true - - name: Lint - run: yarn lint - env: - CI: true - - - name: Test - run: yarn test - env: - CI: true + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1.0.3 + with: + token: ${{secrets.CODECOV_TOKEN}} + file: ./coverage/clover.xml diff --git a/jest.config.js b/jest.config.js index 71c38fae6..0b8094668 100644 --- a/jest.config.js +++ b/jest.config.js @@ -8,5 +8,5 @@ module.exports = { }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], collectCoverage: true, - collectCoverageFrom: ['src/**/*.(t|j)s?(x)'] + collectCoverageFrom: ['src/**/*.(t|j)s?(x)', '!src/example/**/**'] }