Skip to content

Commit

Permalink
[ts-sdk] Add CI tests (MystenLabs#2117)
Browse files Browse the repository at this point in the history
  • Loading branch information
666lcz authored May 23, 2022
1 parent a70a2ad commit 2a7305d
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 44 deletions.
7 changes: 7 additions & 0 deletions .github/actions/diffs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ outputs:
isExplorerClient:
description: True when there are changes to files related to explorer client
value: "${{ steps.diff.outputs.isExplorerClient }}"
isTypescriptSDK:
description: True when there are changes to files related to TypeScript SDK
value: "${{ steps.diff.outputs.isTypescriptSDK }}"
runs:
using: composite
steps:
Expand All @@ -27,6 +30,10 @@ runs:
isExplorerClient:
- 'explorer/client/**'
- '.github/workflows/explorer-client-prs.yml'
isTypescriptSDK:
- 'sdk/typescript/**'
- 'sui/open_rpc/samples/**'
- '.github/workflows/ts-sdk.yml'
isDoc:
- 'doc/**'
- '*.md'
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/ts-sdk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: TypeScript SDK PR checks
on: pull_request
jobs:
diff:
runs-on: [ubuntu-latest]
outputs:
isTypescriptSDK: ${{ steps.diff.outputs.isTypescriptSDK }}
steps:
- uses: actions/checkout@v3
- name: Detect Changes
uses: "./.github/actions/diffs"
id: diff
client_checks:
name: Test & Build
needs: diff
if: needs.diff.outputs.isTypescriptSDK == 'true'
runs-on: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Nodejs
uses: actions/setup-node@v3
with:
node-version: "16"
cache: "yarn"
cache-dependency-path: ./sdk/typescript/yarn.lock
- name: Install dependencies
working-directory: ./sdk/typescript
run: yarn install
- name: Test
working-directory: ./sdk/typescript
run: yarn test
- name: Build
working-directory: ./sdk/typescript
run: yarn build
32 changes: 0 additions & 32 deletions sdk/typescript/.github/workflows/main.yml

This file was deleted.

12 changes: 0 additions & 12 deletions sdk/typescript/.github/workflows/size.yml

This file was deleted.

0 comments on commit 2a7305d

Please sign in to comment.