WIP content #26100
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: Turborepo CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
jobs: | |
audit: | |
name: pnpm audit | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: pnpm/[email protected] | |
with: | |
version: 8 | |
- name: Install Nodejs | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
- name: Run audit | |
run: pnpm audit --prod --audit-level moderate | |
build: | |
name: Lint, Build, and Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- uses: pnpm/[email protected] | |
with: | |
version: 8 | |
- name: Install Nodejs | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
cache: "pnpm" | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Manypkg Check | |
run: pnpm manypkg check | |
- name: Turbo Cache | |
id: turbo-cache | |
uses: actions/cache@v3 | |
with: | |
path: node_modules/.cache/turbo | |
key: turbo-${{ runner.os }}-${{ github.sha }} | |
restore-keys: | | |
turbo-${{ runner.os }}- | |
- name: Lint | |
run: pnpm turbo lint | |
- name: Build | |
run: pnpm turbo build | |
- name: Test | |
run: pnpm turbo test | |
# Pack wallet extension and upload it as an artifact for easy developer use: | |
- name: Wallet Extension Has Changes? | |
id: wallet-diff | |
continue-on-error: true | |
run: pnpm dlx turbo-ignore sui-wallet | |
- name: Wallet Extension Preview Package | |
if: ${{ steps.wallet-diff.outcome == 'failure' }} | |
run: pnpm wallet pack:zip | |
- uses: actions/upload-artifact@v3 | |
if: ${{ steps.wallet-diff.outcome == 'failure' }} | |
with: | |
name: wallet-extension | |
path: apps/wallet/web-ext-artifacts/* | |
if-no-files-found: error | |
retention-days: 7 |