Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
92b4478
- Added the initial setup for ts-testing
evgeny-s Mar 6, 2026
31bb03e
- Fixed manual sealing for aura consensus
evgeny-s Mar 9, 2026
9dc9db6
- Added remove stake test
evgeny-s Mar 9, 2026
3a9421f
- Updated gigignore
evgeny-s Mar 9, 2026
e5209d3
Reverted fees change
evgeny-s Mar 11, 2026
a94b3ca
- fmt
evgeny-s Mar 11, 2026
e85979d
- docs
evgeny-s Mar 11, 2026
0815804
- Added CI, simulated current e2e setup
evgeny-s Mar 13, 2026
b6d1a6a
- fix CI
evgeny-s Mar 13, 2026
3d407f2
- Removed unused
evgeny-s Mar 13, 2026
506d025
- remove unused
evgeny-s Mar 13, 2026
d6b24fd
- Adapted add_stake test from e2e folder
evgeny-s Mar 13, 2026
34df60c
- Adapted add_stake test from e2e folder
evgeny-s Mar 16, 2026
e80e5ee
- Adapted shield tests from e2e folder
evgeny-s Mar 17, 2026
9bc6722
- Fixed warning
evgeny-s Mar 17, 2026
6e57589
Merge branch 'devnet-ready' into e2e-tests-moonwall
evgeny-s Mar 17, 2026
12915f1
- Added types generation as a part of zombienet script
evgeny-s Mar 17, 2026
00d3ba7
- make optional to prevent install failure
evgeny-s Mar 17, 2026
d9abd0b
- Fixed test for new alpha format
evgeny-s Mar 17, 2026
d05d906
- fixed arg
evgeny-s Mar 17, 2026
19c617e
- Replaced getStake function
evgeny-s Mar 17, 2026
7843ceb
- Improved transaction processing
evgeny-s Mar 17, 2026
9274d30
- Added runtime check
evgeny-s Mar 18, 2026
fd7f751
- fixed path
evgeny-s Mar 18, 2026
804932e
- Fixed pnpm version issue
evgeny-s Mar 18, 2026
18d0097
Merge branch 'devnet-ready' into e2e-tests-moonwall
evgeny-s Mar 19, 2026
845536d
- Revert papi instead of polkadotJS connector type.
evgeny-s Mar 19, 2026
b6085e1
Merge branch 'devnet-ready' into e2e-tests-moonwall
evgeny-s Mar 19, 2026
a0c581a
Merge branch 'devnet-ready' into e2e-tests-moonwall
evgeny-s Mar 20, 2026
d063ee2
- Removed e2e folder
evgeny-s Mar 20, 2026
d46a22c
- Improve CI flow
evgeny-s Mar 20, 2026
471ff77
- fixed trap
evgeny-s Mar 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/e2e.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/scheduled-smoke-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Scheduled Smoke Tests

on:
schedule:
- cron: '0 */6 * * *'

env:
CARGO_TERM_COLOR: always

permissions:
contents: read

jobs:
run-smoke-tests:
runs-on: [self-hosted, type-ccx33]
timeout-minutes: 30

strategy:
fail-fast: false
matrix:
include:
- test: smoke_mainnet
- test: smoke_testnet

name: "smoke-e2e-${{ matrix.test }}"

steps:
- name: Check-out repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: ts-tests/.nvmrc

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Install e2e dependencies
working-directory: ts-tests
run: pnpm install --frozen-lockfile

- name: Run smoke test
working-directory: ts-tests
run: pnpm moonwall test ${{ matrix.test }}
121 changes: 56 additions & 65 deletions .github/workflows/e2e.yml → .github/workflows/typescript-e2e.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,51 @@
name: E2E Tests
name: Typescript E2E Tests

on:
pull_request:

workflow_dispatch:
inputs:
verbose:
description: "Output more information when triggered manually"
required: false
default: ""

env:
CARGO_TERM_COLOR: always

permissions:
contents: read

jobs:
typescript-formatting:
runs-on: ubuntu-latest
steps:
- name: Check-out repository
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: ts-tests/.nvmrc

- name: Install system dependencies
run: |
sudo DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a apt-get update
sudo DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a apt-get install -y --no-install-recommends \
-o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \
build-essential clang curl git make libssl-dev llvm libudev-dev protobuf-compiler pkg-config

- name: Install e2e dependencies
working-directory: ts-tests
run: pnpm install --frozen-lockfile

- name: Formatting check
run: |
cd ts-tests
pnpm run fmt

# Build the node binary in both variants and share as artifacts.
build:
runs-on: [self-hosted, type-ccx33]
needs: [typescript-formatting]
timeout-minutes: 60
strategy:
matrix:
Expand Down Expand Up @@ -62,87 +88,52 @@ jobs:
path: target/release/node-subtensor
if-no-files-found: error

# Discover e2e packages that have a "test" script.
discover:
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.find.outputs.packages }}
steps:
- name: Check-out repository
uses: actions/checkout@v4
with:
sparse-checkout: e2e

- name: Find testable packages
id: find
working-directory: e2e
run: |
packages=$(
find . -maxdepth 2 -name package.json -not -path './node_modules/*' \
| while read -r pkg; do
name=$(jq -r '.name // empty' "$pkg")
has_test=$(jq -r '.scripts.test // empty' "$pkg")
if [ -n "$has_test" ] && [ -n "$name" ]; then
echo "$name"
fi
done \
| jq -R -s -c 'split("\n") | map(select(. != ""))'
)
echo "packages=$packages" >> "$GITHUB_OUTPUT"
echo "Discovered packages: $packages"

# Run each e2e package's tests in parallel.
test:
needs: [build, discover]
if: ${{ needs.discover.outputs.packages != '[]' }}
run-e2e-tests:
needs: [build]
runs-on: [self-hosted, type-ccx33]
timeout-minutes: 30

strategy:
fail-fast: false
matrix:
package: ${{ fromJson(needs.discover.outputs.packages) }}
name: "e2e: ${{ matrix.package }}"
include:
- test: dev
binary: release
- test: zombienet_shield
binary: release
- test: zombienet_staking
binary: fast

name: "typescript-e2e-${{ matrix.test }}"

steps:
- name: Check-out repository
uses: actions/checkout@v4

- name: Download release binary
- name: Download binary
uses: actions/download-artifact@v4
with:
name: node-subtensor-release
name: node-subtensor-${{ matrix.binary }}
path: target/release

- name: Download fast binary
uses: actions/download-artifact@v4
with:
name: node-subtensor-fast
path: target/fast

- name: Make binaries executable
run: chmod +x target/release/node-subtensor target/fast/node-subtensor
- name: Make binary executable
run: chmod +x target/release/node-subtensor

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: e2e/.nvmrc
node-version-file: ts-tests/.nvmrc

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Bootstrap papi types
working-directory: e2e
run: ./bootstrap_types.sh --skip-build

- name: Install e2e dependencies
working-directory: e2e
working-directory: ts-tests
run: pnpm install --frozen-lockfile

- name: Run tests
working-directory: e2e
env:
# Use fast-runtime binary for staking package, release binary for others
# Path is relative to package directory (e2e/<package>/)
BINARY_PATH: ${{ matrix.package == 'e2e-staking' && '../../target/fast/node-subtensor' || '../../target/release/node-subtensor' }}
run: pnpm --filter ${{ matrix.package }} test
run: |
cd ts-tests
pnpm moonwall test ${{ matrix.test }}
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,10 @@ by appending your own. A few useful ones are as follow.
```
-->

## Testing

Check [testing section](./docs/testing.md).

## License
The MIT License (MIT)
Copyright © 2021 Yuma Rao
Expand Down
39 changes: 39 additions & 0 deletions docs/testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Testing

Typescript tests are run with [Moonwall](https://github.com/Moonsong-Labs/moonwall). To run these you will need to have pnpm installed:

```
# Use the correct Node version
nvm use

# Install moonwall
sudo npm i -g pnpm

# Change directory to test
cd ts-tests

# Install dependencies
pnpm i

# Run manual seal dev tests
pnpm moonwall test dev

# Run zombienet tests
pnpm moonwall test zombienet

# If you have MacOS, you might need to run zombinet test with sudo, because tmp folder
sudo pnpm moonwall test zombienet

# Run smoke tests
pnpm moonwall test smoke_mainnet
```

Moonwall lets you also run the testing environment without performing any tests on it, as a method for you to manually test certain things:

```
# Dev tests in run mode
pnpm moonwall run dev

# Zombinet test with run mode
pnpm moonwall run zombienet
```
3 changes: 0 additions & 3 deletions e2e/.gitignore

This file was deleted.

6 changes: 0 additions & 6 deletions e2e/.prettierrc

This file was deleted.

83 changes: 0 additions & 83 deletions e2e/README.md

This file was deleted.

Loading
Loading