Skip to content

Commit

Permalink
feat(TypeScript): add codechecks to circleci
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip London committed Dec 31, 2019
1 parent 7654dc8 commit bd54ad7
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
9 changes: 8 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ jobs:
- run:
name: Test Code
command: yarn ci:test:build && yarn ci:test:core:components && yarn ci:test:frontend
codechecks:
<<: *container_config
steps:
- *attach_workspace
- run:
name: Run Codechecks
command: yarn codechecks
workflows:
version: 2

Expand All @@ -79,6 +86,6 @@ workflows:
- lint:
requires:
- npm_install
- test:
- codechecks:
requires:
- npm_install
4 changes: 3 additions & 1 deletion codechecks.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
checks:
- name: typecov
- name: typecov
options:
atLeast: 80
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Campaigns } from '../types'
import { FormattedMessage } from 'react-intl'
import { GreyCartridge, SuccessCartridge } from '../AirdropInfo/model'
import { Icon, Text } from 'blockchain-info-components'
Expand All @@ -17,7 +18,7 @@ const TypeWrapper = styled.div`
// userCampaignState: "NONE", "REGISTERED", "TASK_FINISHED", "REWARD_SEND", "REWARD_RECEIVED", "FAILED"
// userCampaignTransactionResponseList: []

export const Type = ({ campaignName }) => {
export const Type = ({ campaignName }: { campaignName: Campaigns }) => {
switch (campaignName) {
case 'SUNRIVER':
return (
Expand Down Expand Up @@ -84,8 +85,8 @@ export const To = ({ campaignName, userCampaignState }) => {
My Stellar Wallet
</Text>
) : (
<Text>-</Text>
)
<Text>-</Text>
)
default:
return <Text>-</Text>
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Exchange } from 'blockchain-wallet-v4/src'
import { FormattedMessage } from 'react-intl'
import { Status, To, Type } from './model'
import { Status, To, Type } from './model.tsx'
import {
Table,
TableCell,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export type Campaigns = 'BLOCKSTACK'
export type Campaigns = 'BLOCKSTACK' | 'SUNRIVER' | 'POWER_PAX'

export type UserCampaignState =
| 'FAILED'
Expand Down

0 comments on commit bd54ad7

Please sign in to comment.