diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 90fa16504a9..00000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,33 +0,0 @@ -# Javascript Node CircleCI 2.0 configuration file -# -# Check https://circleci.com/docs/2.0/language-javascript/ for more details -# -version: 2 -jobs: - build: - docker: - # Service container image - - image: circleci/node:14.7.0 - - working_directory: ~/chain-events - - steps: - # inital checkout - - checkout - - restore_cache: - key: dependency-cache-{{ checksum "yarn.lock" }} - - run: - name: update dependencies - command: yarn - - save_cache: - key: dependency-cache-{{ checksum "yarn.lock" }} - paths: - - ./node_modules - - run: - name: run tests - command: yarn test - - store_artifacts: - path: coverage - - run: - name: lint - command: yarn lint \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000000..f7a854bdf40 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,42 @@ +name: Build +on: [push] + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v1 + + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: 14.x + + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + + - uses: actions/cache@v2 + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - name: Install dependencies + run: yarn + + - name: Run tests + run: yarn test + + - name: Archive code coverage results + uses: actions/upload-artifact@v2 + with: + name: code-coverage-report + path: coverage + + - name: Run linter + run: yarn lint \ No newline at end of file diff --git a/src/substrate/storageFetcher.ts b/src/substrate/storageFetcher.ts index 458c92fbd74..9d97734dfff 100644 --- a/src/substrate/storageFetcher.ts +++ b/src/substrate/storageFetcher.ts @@ -20,7 +20,7 @@ import { } from '@polkadot/types/interfaces'; import { Codec } from '@polkadot/types/types'; import { DeriveProposalImage } from '@polkadot/api-derive/types'; -import { hexToString, isFunction } from '@polkadot/util'; +import { isFunction } from '@polkadot/util'; import { CWEvent, IStorageFetcher } from '../interfaces'; import { factory, formatFilename } from '../logging'; @@ -45,7 +45,6 @@ import { IdentityJudgement, ITreasuryBountyBecameActive, ITreasuryBountyAwarded, - ITreasuryBountyClaimed, ITreasuryBountyEvents, } from './types'; diff --git a/test/unit/edgeware/storageFetcher.spec.ts b/test/unit/edgeware/storageFetcher.spec.ts index c5240c275f2..e6bb897766f 100644 --- a/test/unit/edgeware/storageFetcher.spec.ts +++ b/test/unit/edgeware/storageFetcher.spec.ts @@ -10,7 +10,7 @@ import { Votes, Bounty, } from '@polkadot/types/interfaces'; -import { Vec, Data, TypeRegistry, Bytes } from '@polkadot/types'; +import { Vec, Data, TypeRegistry } from '@polkadot/types'; import { Codec } from '@polkadot/types/types'; import { stringToHex } from '@polkadot/util'; import { DeriveReferendum } from '@polkadot/api-derive/democracy/types'; @@ -30,7 +30,6 @@ import { ICollectiveVoted, IdentityJudgement, ITreasuryBountyProposed, - ITreasuryBountyBecameActive, } from '../../../src/substrate/types'; import { StorageFetcher } from '../../../src/substrate/storageFetcher';