Skip to content

Commit

Permalink
ci: add lint/test/build github action (shapeshift#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xdef1cafe authored Sep 10, 2021
1 parent 6dcdecd commit 06551d2
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 29 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/commitlint.yml

This file was deleted.

33 changes: 33 additions & 0 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: commitlint/lint/test/build

on:
pull_request:
branches:
- main
- develop

jobs:
commitlint-lint-test-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Commit lint
uses: wagoid/commitlint-github-action@v4
- name: Cache dependencies
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install
run: yarn install --frozen-lockfile
- name: Type check
run: yarn type-check
- name: Lint
run: yarn lint
- name: Test
run: yarn test
- name: Build
run: yarn build
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@
"version": "independent"
},
"scripts": {
"build": "lerna run build --include-dependencies",
"dev": "lerna run dev --stream --parallel",
"lint": "eslint --cache .",
"test": "jest",
"test:dev": "jest --watch",
"build": "lerna run build --include-dependencies",
"dev": "lerna run dev --stream --parallel",
"type-check": "lerna run type-check",
"publish:lerna": "lerna publish from-package --no-private --yes",
"version:patch": "lerna version patch --yes --no-git-tag-version --no-push",
"version:minor": "lerna version minor --yes --no-git-tag-version --no-push",
"version:major": "lerna version major --yes --no-git-tag-version --no-push",
"publish:lerna": "lerna publish from-package --no-private --yes"
"version:major": "lerna version major --yes --no-git-tag-version --no-push"
},
"devDependencies": {
"@commitlint/cli": "^13.1.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/asset-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"generate": "node ./dist/generateAssetData/GenerateAssetData.js",
"dev": "tsc --watch",
"clean": "rm -rf dist",
"test": "jest test"
"test": "jest test",
"type-check": "tsc --project ./tsconfig.json --noEmit"
},
"dependencies": {
"lodash": "^4.17.21"
Expand Down
5 changes: 3 additions & 2 deletions packages/chain-adapters/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@
"url": "https://github.com/shapeshift/lib"
},
"scripts": {
"adapterCli": "yarn build && node ./dist/ChainAdapterCLI.js",
"build": "yarn clean && tsc --project tsconfig.build.json",
"dev": "tsc --watch",
"clean": "rm -rf dist",
"dev": "tsc --watch",
"test": "jest test",
"adapterCli": "yarn build && node ./dist/ChainAdapterCLI.js"
"type-check": "tsc --project ./tsconfig.json --noEmit"
},
"dependencies": {
"@shapeshiftoss/hdwallet-core": "^1.15.5-alpha.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

describe('EthereumChainAdapter', () => {
describe('getBalance', () => {
console.info('getBalance test')
it('is unimplemented', () => {
expect(true).toBeTruthy()
})
})
})
5 changes: 3 additions & 2 deletions packages/market-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
},
"scripts": {
"build": "yarn clean && tsc --project tsconfig.build.json",
"dev": "tsc --watch",
"clean": "rm -rf dist",
"test": "jest test"
"dev": "tsc --watch",
"test": "jest test",
"type-check": "tsc --project ./tsconfig.json --noEmit"
},
"dependencies": {
"axios": "^0.21.1",
Expand Down
5 changes: 5 additions & 0 deletions packages/market-service/src/coingecko/coingecko.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
describe('market service', () => {
it('is unimplemented', () => {
expect(true).toBeTruthy()
})
})
2 changes: 1 addition & 1 deletion packages/market-service/src/coingecko/coingecko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export class CoinGeckoMarketService implements MarketService {
const { data: historyData } = await axios.get(
`${url}/market_chart/range?id=${network}&vs_currency=${currency}&from=${from}&to=${to}`
)
return historyData?.prices?.map((data: any) => {
return historyData?.prices?.map((data: [string, number]) => {
return {
date: new Date(data[0]),
price: data[1]
Expand Down

0 comments on commit 06551d2

Please sign in to comment.