Skip to content

Commit

Permalink
wallet-ext: workflow to check prs
Browse files Browse the repository at this point in the history
  • Loading branch information
pchrysochoidis committed Jul 20, 2022
1 parent 08d1bd2 commit 6f1b0ac
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/actions/diffs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ outputs:
isTypescriptSDK:
description: True when there are changes to files related to TypeScript SDK
value: "${{ steps.diff.outputs.isTypescriptSDK }}"
isWalletExt:
description: True when there are changes to files related to Wallet Extension
value: "${{ steps.diff.outputs.isWalletExt }}"
runs:
using: composite
steps:
Expand All @@ -38,3 +41,6 @@ runs:
- 'doc/**'
- '*.md'
- '.github/workflows/docs.yml'
isWalletExt:
- 'wallet/**'
- '.github/workflows/wallet-ext-prs.yml'
43 changes: 43 additions & 0 deletions .github/workflows/wallet-ext-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Wallet Extension PR checks
on: pull_request
jobs:
diff:
runs-on: [self-hosted, self-hosted-ubuntu]
outputs:
isWalletExt: ${{ steps.diff.outputs.isWalletExt }}
steps:
- uses: actions/checkout@v3
- name: Detect Changes
uses: "./.github/actions/diffs"
id: diff
run_checks:
name: Lint, Test & Build
needs: diff
if: needs.diff.outputs.isWalletExt == 'true'
runs-on: [self-hosted, self-hosted-ubuntu]
env:
working-directory: ./wallet
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Nodejs
uses: actions/setup-node@v3
with:
node-version: "16"
cache: 'npm'
cache-dependency-path: ./wallet/package-lock.json
- name: Build sdk
working-directory: ./sdk/typescript
run: yarn
- name: Install dependencies
working-directory: ${{env.working-directory}}
run: npm ci
- name: Lint
working-directory: ${{env.working-directory}}
run: npm run lint
- name: Test
working-directory: ${{env.working-directory}}
run: npm test
- name: Build
working-directory: ${{env.working-directory}}
run: npm run build:prod

0 comments on commit 6f1b0ac

Please sign in to comment.