Skip to content

Commit

Permalink
chore(CI): Merge turborepo workflows (#5082)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaughterOfMars authored Jan 30, 2025
1 parent b2974a2 commit 700958c
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 81 deletions.
75 changes: 0 additions & 75 deletions .github/workflows/_turborepo.yml

This file was deleted.

80 changes: 74 additions & 6 deletions .github/workflows/turbo_hierarchy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,82 @@ jobs:
uses: "./.github/actions/diffs"
id: diff

turborepo:
uses: ./.github/workflows/_turborepo.yml
audit:
name: pnpm audit
runs-on: self-hosted
concurrency:
group: turbo-audit-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/develop' }}
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- name: Install Nodejs
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: "20"
- name: Run audit
run: pnpm audit --prod --audit-level high

build:
name: Lint, Build, and Test
runs-on: self-hosted
concurrency:
group: turbo-build-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/develop' }}
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 2
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- name: Install Nodejs
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: "20"
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@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
with:
path: .turbo
key: turbo-${{ runner.os }}-${{ github.sha }}
restore-keys: |
turbo-${{ runner.os }}-
- name: Lint
run: pnpm turbo lint
- name: Install wasm-pack for mbf package
uses: jetli/wasm-pack-action@0d096b08b4e5a7de8c28de67e11e945404e9eefa # v0.4.0
with:
version: "latest"
- name: Build
run: pnpm turbo build
- name: Test
# @iota/ledgerjs-hw-app-iota is tested separately
run: pnpm turbo test --filter '!@iota/ledgerjs-hw-app-iota'
# 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 iota-wallet
- name: Wallet Extension Preview Package
if: steps.wallet-diff.outcome == 'failure'
run: pnpm --filter iota-wallet pack:zip
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
if: steps.wallet-diff.outcome == 'failure'
with:
name: wallet-extension
path: apps/wallet/web-ext-artifacts/*
if-no-files-found: error
retention-days: 7

e2e:
if: (!cancelled() && !failure() && !github.event.pull_request.draft && github.ref_name != 'develop')
needs:
- diff
needs: diff
uses: ./.github/workflows/_e2e.yml
with:
isRpc: ${{ needs.diff.outputs.isRpc == 'true' }}
Expand All @@ -52,7 +121,6 @@ jobs:

ledgernano:
if: (!cancelled() && !failure()) && needs.diff.outputs.isLedgerjs == 'true' && github.event.pull_request.draft == false
needs:
- diff
needs: diff
uses: ./.github/workflows/_ledgernano.yml
secrets: inherit

0 comments on commit 700958c

Please sign in to comment.