Skip to content

Commit

Permalink
Merge branch 'develop' into core-node/feat/remove-multiple-types
Browse files Browse the repository at this point in the history
  • Loading branch information
miker83z committed Oct 25, 2024
2 parents ceac073 + 4cff616 commit 7335792
Show file tree
Hide file tree
Showing 355 changed files with 4,930 additions and 19,456 deletions.
1 change: 0 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"iota-wallet",
"iota-explorer",
"wallet-dashboard",
"@iota/apps-ui-kit",
"apps-backend",
"@iota/core",
"@iota/apps-ui-kit",
Expand Down
6 changes: 5 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
/docker/ @iotaledger/l1-core-infra @iotaledger/core-node @iotaledger/devops-admin
/crates/iota-json-rpc*/ @iotaledger/l1-core-infra
/crates/iota-graphql*/ @iotaledger/l1-core-infra
/crates/iota-indexer/ @iotaledger/l1-core-infra
/crates/iota-indexer*/ @iotaledger/l1-core-infra
/crates/iota-data-ingestion*/ @iotaledger/l1-core-infra
/crates/iota-analytics-indexer/ @iotaledger/l1-core-infra

# core-node team
/crates/iota-archival/ @iotaledger/core-node
Expand Down Expand Up @@ -75,6 +77,8 @@ vercel.json @iotaledger/boxfish @iotaledger/tooling

# Scripts
/scripts/dependency_graphs/ @muXxer
/scripts/cargo_sort/ @muXxer
/scripts/generate_files/ @muXxer
/scripts/codesearch/ @muXxer
/scripts/slipstream/ @muXxer

Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ title: '[Task(*)]: release version x.y.z'
- [ ] Edit `crates/iota-open-rpc/spec/openrpc.json`
- [ ] Update `sdk/typescript/src/version.ts` (`pnpm sdk build`)
- [ ] Update `Cargo.lock` (`cargo check`)
- [ ] Update `crates/iota-framework/packages/deepbook/Move.lock`
- [ ] Update `crates/iota-framework/packages/iota-framework/Move.lock`
- [ ] Update `crates/iota-framework/packages/iota-system/Move.lock`
- [ ] Update `crates/iota-framework/packages/move-stdlib/Move.lock`
Expand Down
1 change: 1 addition & 0 deletions .github/actions/diffs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ runs:
- ".github/workflows/_rust_lints.yml"
- ".github/workflows/_external_rust_tests.yml"
- ".github/workflows/_cargo_deny.yml"
- "scripts/cargo_sort/cargo_sort.py"
- "Cargo.toml"
- "Cargo.lock"
- ".config/nextest.toml"
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/_ledgernano.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Ledgernano End-to-end Tests

on: workflow_call

concurrency:
group: ledgernano-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
ledgernano:
name: Ledgernano
runs-on: self-hosted
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # Pin v4.1.1
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # [email protected]

- name: Install Nodejs
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # [email protected]
with:
node-version: "20"
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Install ledgernano dependencies
run: |
sudo apt-get install -y qemu-user-static
sudo apt-get install -y libxcb-xinerama0
sudo pip install speculos --break-system-packages
- name: Download ledgernano bin
run: |
sudo apt-get install -y gh
echo ${{ secrets.LEDGER_APP_TOKEN }} | gh auth login --with-token
gh release list --repo https://github.com/iotaledger/ledger-app-iota
gh release download --repo https://github.com/iotaledger/ledger-app-iota -p nanos.tar.gz untagged-a706a550379839d8db15
tar -xvf nanos.tar.gz
mv nanos/iota sdk/ledgerjs-hw-app-iota/tests/iota
- name: Start speculos simulator
run: speculos --api-port 5000 --display headless ./sdk/ledgerjs-hw-app-iota/tests/iota &

- name: Run TS SDK ledgernano tests
run: pnpm --filter @iota/ledgerjs-hw-app-iota test
18 changes: 18 additions & 0 deletions .github/workflows/_rust_lints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,24 @@ jobs:
- name: Check Rust formatting
run: cargo +nightly ci-fmt

cargo-sort:
if: (!cancelled() && inputs.isRust)
runs-on: [self-hosted]
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4
- name: Check Cargo.toml format and sorting
run: |
pushd "scripts/cargo_sort"
./run.sh --skip-dprint
popd
- name: Check Cargo.toml diffs after formatting
run: |
if git status --porcelain | grep -q "Cargo.toml"; then
echo "Cargo.toml files not formatted and/or sorted properly! Please run the 'scripts/cargo_sort/run.sh' script."
git diff # Show the actual diffs
exit 1 # Fail the workflow
fi
clippy:
if: (!cancelled() && !failure() && inputs.isRust)
needs:
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/_turborepo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@ jobs:
- name: (debug-before) Check SDK dist folder
continue-on-error: true
run: tree ./sdk/typescript/dist
- name: (debug) Lint
continue-on-error: true
run: pnpm turbo lint
- name: (debug-after) Check SDK dist folder
continue-on-error: true
run: tree ./sdk/typescript/dist
- name: Lint
run: pnpm turbo lint
- name: Install wasm-pack for mbf package
Expand All @@ -73,7 +67,8 @@ jobs:
- name: Build
run: pnpm turbo build
- name: Test
run: pnpm turbo 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
Expand Down
98 changes: 98 additions & 0 deletions .github/workflows/_vercel_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Vercel Deploys

on:
workflow_call:
inputs:
isExplorer:
type: boolean
required: true
isTypescriptSDK:
type: boolean
required: true
isAppsBackend:
type: boolean
required: true
isAppsUiKit:
type: boolean
required: true
isWalletDashboard:
type: boolean
required: true
shouldDeployPreview:
type: boolean
required: true
isDevelop:
type: boolean
required: true
githubRef:
type: string
required: true

concurrency:
group: ${{ github.workflow }}-${{ inputs.githubRef }}
cancel-in-progress: true

jobs:
explorer-preview:
name: Vercel Explorer Preview
if: inputs.shouldDeployPreview && inputs.isExplorer
uses: ./.github/workflows/apps-explorer.deploy.yml
secrets: inherit
with:
isProd: false

explorer-prod:
name: Vercel Explorer Production
if: inputs.isDevelop
uses: ./.github/workflows/apps-explorer.deploy.yml
secrets: inherit
with:
isProd: true

ui-kit-preview:
name: Vercel UI Kit Preview
if: inputs.shouldDeployPreview && inputs.isAppsUiKit
uses: ./.github/workflows/apps-ui-kit.deploy.yml
secrets: inherit
with:
isProd: false

ui-kit-prod:
name: Vercel UI Kit Preview
if: inputs.isDevelop
uses: ./.github/workflows/apps-ui-kit.deploy.yml
secrets: inherit
with:
isProd: true

wallet-dashboard-preview:
name: Vercel Wallet Dashboard Preview
if: inputs.shouldDeployPreview && inputs.isWalletDashboard
uses: ./.github/workflows/apps-wallet-dashboard.deploy.yml
secrets: inherit
with:
isProd: false

wallet-dashboard-prod:
name: Vercel Wallet Dashboard Production
if: inputs.isDevelop
uses: ./.github/workflows/apps-wallet-dashboard.deploy.yml
secrets: inherit
with:
isProd: true

apps-backend-preview:
name: Vercel apps-backend Preview
if: inputs.shouldDeployPreview && inputs.isAppsBackend
uses: ./.github/workflows/apps-backend.deploy.yml
secrets: inherit
with:
isProd: false

apps-backend-prod:
name: Vercel apps-backend Production
if: inputs.isDevelop
uses: ./.github/workflows/apps-backend.deploy.yml
secrets: inherit
with:
isProd: true
48 changes: 0 additions & 48 deletions .github/workflows/apps-backend-production.deploy.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
name: Preview Deploy for Apps Backend
name: Deploy for Apps Backend

env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.APPS_BACKEND_VERCEL_PROJECT_ID }}

on:
pull_request:
paths:
- "apps/apps-backend/**"
- ".github/workflows/apps-backend-preview.deploy.yml"
workflow_dispatch:
workflow_call:
inputs:
isProd:
type: boolean
required: true

jobs:
deploy-preview:
deploy:
permissions:
contents: read
pull-requests: write
Expand All @@ -26,6 +28,18 @@ jobs:
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Setup Prod Flag
id: setup_prod_flags
run: |
if [[ "${{ inputs.isProd }}" = "true" ]]; then
echo "PROD_FLAG=--prod" >> $GITHUB_OUTPUT
echo "ENVIRONMENT=production" >> $GITHUB_OUTPUT
echo "VERCEL_OUTPUT=" >> $GITHUB_OUTPUT
else
echo "PROD_FLAG=" >> $GITHUB_OUTPUT
echo "ENVIRONMENT=preview" >> $GITHUB_OUTPUT
echo "VERCEL_OUTPUT=> vercel_output.txt" >> $GITHUB_OUTPUT
fi
- name: Turbo Cache
id: turbo-cache
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # pin@v4
Expand All @@ -36,18 +50,20 @@ jobs:
turbo-${{ runner.os }}-
- name: Install Vercel CLI
run: pnpm add --global vercel@canary
- name: Pull Vercel Env variables (network configs)
run: vercel pull --yes --environment=${{steps.setup_prod_flags.outputs.ENVIRONMENT}} --token=${{ secrets.VERCEL_TOKEN }}
- name: Build the Apps Backend
run: pnpm apps-backend build
- name: Pull Vercel Environment
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Vercel Project Artifacts
run: vercel build ${{steps.setup_prod_flags.outputs.PROD_FLAG}} --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} > vercel_output.txt
run: vercel deploy ${{steps.setup_prod_flags.outputs.PROD_FLAG}} --prebuilt --token=${{ secrets.VERCEL_TOKEN }} ${{ steps.setup_prod_flags.outputs.VERCEL_OUTPUT }}
- name: Extract Deploy URL
id: deploy_url
if: ${{ inputs.isProd == false }}
run: echo "DEPLOY_URL=$(cat vercel_output.txt | awk 'END{print}')" >> $GITHUB_OUTPUT
- name: Comment on pull request
if: ${{ inputs.isProd == false }}
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # pin@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
Loading

0 comments on commit 7335792

Please sign in to comment.