Skip to content

Commit

Permalink
Migrate to github actions. (#64)
Browse files Browse the repository at this point in the history
* Move to github actions.

* Switch to yarn instead of npm caching.

* Fix lint annotation errors.
  • Loading branch information
jnaviask authored Jun 8, 2021
1 parent 13e6701 commit d6d33b0
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 37 deletions.
33 changes: 0 additions & 33 deletions .circleci/config.yml

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 1 addition & 2 deletions src/substrate/storageFetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -45,7 +45,6 @@ import {
IdentityJudgement,
ITreasuryBountyBecameActive,
ITreasuryBountyAwarded,
ITreasuryBountyClaimed,
ITreasuryBountyEvents,
} from './types';

Expand Down
3 changes: 1 addition & 2 deletions test/unit/edgeware/storageFetcher.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -30,7 +30,6 @@ import {
ICollectiveVoted,
IdentityJudgement,
ITreasuryBountyProposed,
ITreasuryBountyBecameActive,
} from '../../../src/substrate/types';
import { StorageFetcher } from '../../../src/substrate/storageFetcher';

Expand Down

0 comments on commit d6d33b0

Please sign in to comment.