Skip to content

Commit

Permalink
Merge branch 'develop' into tooling-wallet/make-gh-releases-for-walle…
Browse files Browse the repository at this point in the history
…t-prod-releases
  • Loading branch information
marc2332 authored Nov 19, 2024
2 parents 705d4c9 + 3b56161 commit 20d133a
Show file tree
Hide file tree
Showing 1,205 changed files with 29,817 additions and 75,767 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"access": "public",
"baseBranch": "develop",
"updateInternalDependencies": "minor",
"privatePackages": false,
Expand Down
4 changes: 2 additions & 2 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ failure-output = "immediate"
status-level = "skip"
# Retry failing tests in order to not block builds on flaky tests
retries = 1
# Timeout tests after 4 minutes
slow-timeout = { period = "60s", terminate-after = 4 }
# Timeout tests after 5 minutes
slow-timeout = { period = "60s", terminate-after = 5 }

[profile.simtestnightly]
# Print out output for failing tests as soon as they fail, and also at the end
Expand Down
6 changes: 0 additions & 6 deletions .github/crates-filters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,3 @@ iota-move-natives-latest:
- "iota-execution/latest/iota-move-natives/**"
iota-verifier-latest:
- "iota-execution/latest/iota-verifier/**"
iota-adapter-v0:
- "iota-execution/v0/iota-adapter/**"
iota-move-natives-v0:
- "iota-execution/v0/iota-move-natives/**"
iota-verifier-v0:
- "iota-execution/v0/iota-verifier/**"
2 changes: 1 addition & 1 deletion .github/workflows/_cargo_deny.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
default: "./Cargo.toml"

concurrency:
group: cargo-deny-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
group: cargo-deny-${{ inputs.manifest-path || './Cargo.toml' }}-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
Expand Down
38 changes: 23 additions & 15 deletions .github/workflows/_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ on:
inputs:
isRust:
type: boolean
required: true
required: false
isExplorer:
type: boolean
required: true
required: false
isAppsBackend:
type: boolean
required: false
isTypescriptSDK:
type: boolean
required: true
required: false
isWallet:
type: boolean
required: true
required: false
isGraphQlTransport:
type: boolean
required: true
isDevelop:
type: boolean
required: true
required: false

concurrency:
group: e2e-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand All @@ -30,7 +30,7 @@ jobs:
# Run e2e test against localnet built on the develop branch
localnet:
name: Localnet
if: inputs.isExplorer || inputs.isTypescriptSDK || inputs.isWallet || inputs.isRust || inputs.isDevelop
if: inputs.isExplorer || inputs.isTypescriptSDK || inputs.isWallet || inputs.isRust || github.ref_name == 'develop'
runs-on: self-hosted
services:
postgres:
Expand Down Expand Up @@ -67,19 +67,27 @@ jobs:
echo "E2E_RUN_LOCAL_NET_CMD=(RUST_LOG=info RUST_BACKTRACE=1 $(echo $PWD/target/debug/iota) start --with-faucet --force-regenesis --with-indexer --with-graphql)" >> $GITHUB_ENV
- name: Run TS SDK e2e tests
if: inputs.isTypescriptSDK || inputs.isRust || inputs.isDevelop
if: inputs.isTypescriptSDK || inputs.isRust || github.ref_name == 'develop'
run: pnpm dlx concurrently --kill-others --success command-1 "$E2E_RUN_LOCAL_NET_CMD" 'pnpm --filter @iota/iota-sdk test:e2e'

- name: Run RPC/GraphQL compatibility e2e tests
if: inputs.isGraphQlTransport || inputs.isRust || inputs.isDevelop
if: inputs.isGraphQlTransport || inputs.isRust || github.ref_name == 'develop'
run: pnpm dlx concurrently --kill-others --success command-1 "$E2E_RUN_LOCAL_NET_CMD" 'pnpm --filter @iota/graphql-transport test:e2e'

- name: Build apps-backend
if: inputs.isAppsBackend || github.ref_name == 'develop'
run: pnpm --filter apps-backend build

- name: Run apps-backend e2e tests
if: inputs.isAppsBackend || github.ref_name == 'develop'
run: pnpm --filter apps-backend test:e2e

- name: Build explorer
if: inputs.isTypescriptSDK || inputs.isExplorer || inputs.isRust || inputs.isDevelop
if: inputs.isTypescriptSDK || inputs.isExplorer || inputs.isRust || github.ref_name == 'develop'
run: pnpm turbo --filter=iota-explorer build

- name: Run Explorer e2e tests
if: inputs.isTypescriptSDK || inputs.isExplorer || inputs.isRust || inputs.isDevelop
if: inputs.isTypescriptSDK || inputs.isExplorer || inputs.isRust || github.ref_name == 'develop'
run: pnpm --filter iota-explorer playwright test
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4
if: always()
Expand All @@ -100,11 +108,11 @@ jobs:
run: cargo run --bin iota start --force-regenesis --with-faucet --epoch-duration-ms 10000 &

- name: Build Wallet
if: inputs.isWallet || inputs.isRust || inputs.isTypescriptSDK || inputs.isDevelop
if: inputs.isWallet || inputs.isRust || inputs.isTypescriptSDK || github.ref_name == 'develop'
run: pnpm wallet build

- name: Run Wallet e2e tests
if: inputs.isWallet || inputs.isRust || inputs.isTypescriptSDK || inputs.isDevelop
if: inputs.isWallet || inputs.isRust || inputs.isTypescriptSDK || github.ref_name == 'develop'
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- pnpm --filter iota-wallet playwright test

- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4
Expand Down
22 changes: 7 additions & 15 deletions .github/workflows/_external_rust_tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Rust tests

on: workflow_call
on:
workflow_call:
inputs:
changedCrates:
type: string
required: false

concurrency:
group: ext-rust-tests-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand All @@ -12,21 +17,8 @@ env:
CARGO_INCREMENTAL: 0

jobs:
changes:
runs-on: [self-hosted]
outputs:
components: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # pin@v3
id: filter
with:
list-files: "json"
filters: .github/external-crates-filters.yml

test:
name: Test external crates
needs: changes
if: (!cancelled())
env:
# Tests written with #[sim_test] are often flaky if run as #[tokio::test] - this var
Expand All @@ -43,7 +35,7 @@ jobs:
run: pip install pyopenssl --upgrade --break-system-packages
- name: cargo test
run: |
array=(${{ join(fromJson(needs.changes.outputs.components), ' ') }})
array=(${{ inputs.changedCrates }})
result=""
Expand Down
38 changes: 33 additions & 5 deletions .github/workflows/_rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,47 @@ jobs:
deny:
uses: ./.github/workflows/_cargo_deny.yml

rust-tests:
crates-changes:
needs: rust-lints
runs-on: [self-hosted]
outputs:
components: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # pin@v3
id: filter
with:
list-files: "json"
filters: .github/crates-filters.yml

external-changes:
needs: rust-lints
runs-on: [self-hosted]
outputs:
components: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # pin@v3
id: filter
with:
list-files: "json"
filters: .github/external-crates-filters.yml

crates-tests:
if: |
!cancelled() && !failure() && inputs.isRust && github.event.pull_request.draft == false
needs:
- rust-lints
needs: crates-changes
uses: ./.github/workflows/_rust_tests.yml
with:
changedCrates: ${{ join(fromJson(needs.crates-changes.outputs.components), ' ') }}

external-tests:
if: |
!cancelled() && !failure() && inputs.isRust && github.event.pull_request.draft == false
needs:
- rust-lints
needs: external-changes
uses: ./.github/workflows/_external_rust_tests.yml
with:
changedCrates: ${{ join(fromJson(needs.external-changes.outputs.components), ' ') }}

execution-cut:
if: |
Expand Down
28 changes: 11 additions & 17 deletions .github/workflows/_rust_tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Rust tests

on: workflow_call
on:
workflow_call:
inputs:
changedCrates:
type: string
required: false

concurrency:
group: rust-tests-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand All @@ -21,21 +26,8 @@ env:
RUSTDOCFLAGS: -D warnings

jobs:
changes:
runs-on: [self-hosted]
outputs:
components: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # pin@v3
id: filter
with:
list-files: "json"
filters: .github/crates-filters.yml

test:
name: Test rust crates
needs: changes
if: (!cancelled())
env:
# Tests written with #[sim_test] are often flaky if run as #[tokio::test] - this var
Expand All @@ -50,7 +42,7 @@ jobs:
tool: nextest
- name: cargo test
run: |
array=(${{ join(fromJson(needs.changes.outputs.components), ' ') }})
array=(${{ inputs.changedCrates }})
result=""
Expand Down Expand Up @@ -126,7 +118,6 @@ jobs:

simtest:
name: Simtest rust
needs: changes
timeout-minutes: 45
runs-on: [self-hosted]
env:
Expand All @@ -138,7 +129,7 @@ jobs:
tool: nextest
- name: setup filter
run: |
array=(${{ join(fromJson(needs.changes.outputs.components), ' ') }})
array=(${{ inputs.changedCrates }})
result=""
Expand Down Expand Up @@ -243,3 +234,6 @@ jobs:
cargo nextest run --no-fail-fast --test-threads 8 --package iota-graphql-e2e-tests --features pg_integration
cargo nextest run --no-fail-fast --test-threads 1 --package iota-cluster-test --test local_cluster_test --features pg_integration
cargo nextest run --no-fail-fast --test-threads 1 --package iota-indexer --test ingestion_tests --features pg_integration
# Iota-indexer's RPC tests, which depend on a shared runtime, are incompatible with nextest due to its process-per-test execution model.
# cargo test, on the other hand, allows tests to share state and resources by default.
cargo test --profile simulator --package iota-indexer --test rpc-tests --features shared_test_runtime
11 changes: 0 additions & 11 deletions .github/workflows/_turborepo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,12 @@ jobs:
key: turbo-${{ runner.os }}-${{ github.sha }}
restore-keys: |
turbo-${{ runner.os }}-
- name: (debug) Install `tree`
run: sudo apt install tree -y
- name: (debug-before) 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
uses: jetli/wasm-pack-action@0d096b08b4e5a7de8c28de67e11e945404e9eefa # [email protected]
with:
version: "latest"
- name: (debug) Build
continue-on-error: true
run: pnpm turbo build
- name: (debug-after) Check SDK dist folder
continue-on-error: true
run: tree ./sdk/typescript/dist
- name: Build
run: pnpm turbo build
- name: Test
Expand Down
16 changes: 5 additions & 11 deletions .github/workflows/_vercel_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,9 @@ on:
shouldDeployPreview:
type: boolean
required: true
isDevelop:
type: boolean
required: true
githubRef:
type: string
required: true

concurrency:
group: ${{ github.workflow }}-${{ inputs.githubRef }}
group: vercel-deploy-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
Expand All @@ -44,7 +38,7 @@ jobs:

explorer-staging:
name: Vercel Explorer Staging
if: inputs.isDevelop
if: github.ref_name == 'develop'
uses: ./.github/workflows/apps_explorer_deploy.yml
secrets: inherit
with:
Expand All @@ -61,7 +55,7 @@ jobs:

ui-kit-prod:
name: Vercel UI Kit Production
if: inputs.isDevelop
if: github.ref_name == 'develop'
uses: ./.github/workflows/apps_ui_kit_deploy.yml
secrets: inherit
with:
Expand All @@ -77,7 +71,7 @@ jobs:

wallet-dashboard-prod:
name: Vercel Wallet Dashboard Production
if: inputs.isDevelop
if: github.ref_name == 'develop'
uses: ./.github/workflows/apps_wallet_dashboard_deploy.yml
secrets: inherit
with:
Expand All @@ -93,7 +87,7 @@ jobs:

apps-backend-prod:
name: Vercel apps-backend Production
if: inputs.isDevelop
if: github.ref_name == 'develop'
uses: ./.github/workflows/apps_backend_deploy.yml
secrets: inherit
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/apps_wallet_nightly_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
restore-keys: |
turbo-${{ runner.os }}-
- name: Build Wallet
run: pnpm wallet build
run: pnpm wallet build:nightly
- name: Upload artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/apps_wallet_prod_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ env:
DEFAULT_NETWORK: ${{ secrets.WALLET_PROD_DEFAULT_NETWORK }}
IOTA_NETWORKS: ${{ secrets.WALLET_PROD_IOTA_NETWORKS }}
APPS_BACKEND: ${{ secrets.WALLET_PROD_APPS_BACKEND }}
SENTRY_AUTH_TOKEN: ${{ secrets.TOOLING_SENTRY_AUTH_TOKEN }}

jobs:
wallet-prod-build:
Expand Down
Loading

0 comments on commit 20d133a

Please sign in to comment.