Skip to content

Commit

Permalink
feat: add ci script
Browse files Browse the repository at this point in the history
  • Loading branch information
zhigang1992 committed Jul 12, 2024
1 parent 03ab838 commit 4c9ee30
Show file tree
Hide file tree
Showing 8 changed files with 700 additions and 669 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: CI
on: [push]

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 20

steps:
- uses: actions/checkout@v2
- name: Setup pnpm
run: corepack enable
- uses: actions/setup-node@v2
with:
node-version: "18"
cache: "pnpm"
- name: Install Deps
run: pnpm install --frozen-lockfile --verify-store-integrity
- name: Test
run: pnpm run ci
env:
CI: true
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
"test": "dts test",
"lint": "dts lint",
"size": "size-limit",
"gen:contract": "rm -rf src/generated/smartContract/* && tsx ./scripts/gen-contract.ts",
"analyze": "size-limit --why"
"gen:contract": "rm -rf src/generated/smartContract/* && tsx ./scripts/gen-contract.ts && prettier --write 'src/generated/smartContract'",
"analyze": "size-limit --why",
"ci": "pnpm run lint && pnpm run test && pnpm run size"
},
"husky": {
"hooks": {
Expand All @@ -37,11 +38,11 @@
"size-limit": [
{
"path": "dist/alex-sdk.cjs.production.min.js",
"limit": "10 KB"
"limit": "20 KB"
},
{
"path": "dist/alex-sdk.esm.js",
"limit": "10 KB"
"limit": "20 KB"
}
],
"dependencies": {
Expand Down
8 changes: 4 additions & 4 deletions src/config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const configs = {
CONTRACT_DEPLOYER: 'SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM',
SDK_API_HOST: "https://alex-sdk-api.alexlab.co",
BACKEND_API_HOST: "https://api.alexgo.io",
STACKS_API_HOST: "https://api.hiro.so",
READONLY_CALL_API_HOST: "https://stacks-node.alexlab.co",
SDK_API_HOST: 'https://alex-sdk-api.alexlab.co',
BACKEND_API_HOST: 'https://api.alexgo.io',
STACKS_API_HOST: 'https://api.hiro.so',
READONLY_CALL_API_HOST: 'https://stacks-node.alexlab.co',
};
2 changes: 2 additions & 0 deletions src/currency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ export type Currency = string & {
readonly brand: unique symbol;
};

// ignore duplicate
// eslint-disable-next-line @typescript-eslint/no-redeclare
export namespace Currency {
export const STX = createCurrency('token-wstx');
export const ALEX = createCurrency('age000-governance-token');
Expand Down
Loading

0 comments on commit 4c9ee30

Please sign in to comment.