Aptos chain support from sdk #92
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR Checks | |
on: | |
pull_request: | |
branches: | |
- "**" | |
env: | |
NODE_VERSION: 20 | |
CACHE_KEY: deps-${{ github.sha }} | |
jobs: | |
install: | |
name: Install Dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
registry-url: "https://registry.npmjs.org" | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Install dependencies | |
run: pnpm install | |
- name: Save Cache | |
uses: actions/cache/save@v3 | |
with: | |
path: | | |
node_modules | |
./**/node_modules | |
key: ${{ env.CACHE_KEY }} | |
build: | |
needs: install | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Restore Cache | |
uses: actions/cache/restore@v3 | |
with: | |
path: | | |
node_modules | |
./**/node_modules | |
key: ${{ env.CACHE_KEY }} | |
- name: Build Packages | |
run: pnpm build:packages | |
lint: | |
needs: install | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Restore Cache | |
uses: actions/cache/restore@v3 | |
with: | |
path: | | |
node_modules | |
./**/node_modules | |
key: ${{ env.CACHE_KEY }} | |
- name: Check Lint | |
run: pnpm lint | |
format: | |
needs: install | |
name: Format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Restore Cache | |
uses: actions/cache/restore@v3 | |
with: | |
path: | | |
node_modules | |
./**/node_modules | |
key: ${{ env.CACHE_KEY }} | |
- name: Check Format | |
run: pnpm check-format | |
# TODO: Readd this step | |
# exports: | |
# needs: install | |
# name: Exports | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - name: Install pnpm | |
# uses: pnpm/action-setup@v2 | |
# with: | |
# version: 8 | |
# - name: Restore Cache | |
# uses: actions/cache/restore@v3 | |
# with: | |
# path: | | |
# node_modules | |
# ./**/node_modules | |
# key: ${{ env.CACHE_KEY }} | |
# - name: Check Exports | |
# run: pnpm check-exports | |
status-check: | |
needs: [build, lint, format] | |
name: Status Check | |
runs-on: ubuntu-latest | |
if: always() | |
steps: | |
- name: Success | |
if: ${{ !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }} | |
run: exit 0 | |
- name: Failure | |
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }} | |
run: exit 1 |