-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: e2e bittensor tests #434
Merged
distributedstatemachine
merged 3 commits into
development
from
feat/e2e-bittensor-tests
May 19, 2024
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: E2E Bittensor Tests | ||
|
||
concurrency: | ||
group: e2e-bittensor-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
## Run automatically for all PRs against main, regardless of what the changes are | ||
## to be safe and so we can more easily force re-run the CI when github is being | ||
## weird by using a blank commit | ||
push: | ||
branches: [main, development, staging] | ||
|
||
## | ||
# Run automatically for PRs against default/main branch if Rust files change | ||
pull_request: | ||
branches: [main, development, staging] | ||
|
||
## Allow running workflow manually from the Actions tab | ||
workflow_dispatch: | ||
inputs: | ||
verbose: | ||
description: "Output more information when triggered manually" | ||
required: false | ||
default: "" | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
VERBOSE: ${{ github.events.input.verbose }} | ||
|
||
jobs: | ||
run: | ||
runs-on: SubtensorCI | ||
strategy: | ||
matrix: | ||
rust-branch: | ||
- nightly-2024-03-05 | ||
rust-target: | ||
- x86_64-unknown-linux-gnu | ||
# - x86_64-apple-darwin | ||
os: | ||
- ubuntu-latest | ||
# - macos-latest | ||
include: | ||
- os: ubuntu-latest | ||
# - os: macos-latest | ||
env: | ||
RELEASE_NAME: development | ||
RUSTV: ${{ matrix.rust-branch }} | ||
RUST_BACKTRACE: full | ||
RUST_BIN_DIR: target/${{ matrix.rust-target }} | ||
TARGET: ${{ matrix.rust-target }} | ||
steps: | ||
- name: Check-out repository under $GITHUB_WORKSPACE | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update && | ||
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler | ||
- name: Install Rust ${{ matrix.rust-branch }} | ||
uses: actions-rs/[email protected] | ||
with: | ||
toolchain: ${{ matrix.rust-branch }} | ||
components: rustfmt | ||
profile: minimal | ||
|
||
- name: Clone bittensor repo | ||
run: git clone https://github.com/opentensor/bittensor.git | ||
|
||
- name: Setup bittensor repo | ||
working-directory: ${{ github.workspace }}/bittensor | ||
run: | | ||
git checkout tests/e2e-tests-staging | ||
python3 -m pip install -e . | ||
python3 -m pip install torch | ||
- name: Run tests | ||
working-directory: ${{ github.workspace }}/bittensor | ||
run: | | ||
pwd | ||
ls | ||
LOCALNET_SH_PATH="../scripts/localnet.sh" pytest tests/e2e_tests/ -s |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -371,27 +371,27 @@ fn localnet_genesis( | |
let mut balances = vec![ | ||
( | ||
get_account_id_from_seed::<sr25519::Public>("Alice"), | ||
1000000000000u128, | ||
1000000000000000u128, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Increase test account genesis balances so they have enough for particular testing operations |
||
), | ||
( | ||
get_account_id_from_seed::<sr25519::Public>("Bob"), | ||
1000000000000u128, | ||
1000000000000000u128, | ||
), | ||
( | ||
get_account_id_from_seed::<sr25519::Public>("Charlie"), | ||
1000000000000u128, | ||
1000000000000000u128, | ||
), | ||
( | ||
get_account_id_from_seed::<sr25519::Public>("Dave"), | ||
2000000000u128, | ||
2000000000000u128, | ||
), | ||
( | ||
get_account_id_from_seed::<sr25519::Public>("Eve"), | ||
2000000000u128, | ||
2000000000000u128, | ||
), | ||
( | ||
get_account_id_from_seed::<sr25519::Public>("Ferdie"), | ||
2000000000u128, | ||
2000000000000u128, | ||
), | ||
]; | ||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO before merge, once opentensor/bittensor#1885 is in staging