Skip to content

Commit

Permalink
feat: e2e bittensor tests
Browse files Browse the repository at this point in the history
  • Loading branch information
orriin committed May 17, 2024
1 parent d5d20a3 commit d1ee620
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/check-rust.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: Check Rust

concurrency:
group: ci-${{ github.ref }}
Expand Down
81 changes: 81 additions & 0 deletions .github/workflows/e2e-bittensor-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: E2E Bittensor Tests

concurrency:
group: ci-${{ 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:
# runs cargo fmt
e2e-bittensor-tests:
name: e2e bittensor tests
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
# RUSTFLAGS: -A warnings
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 build-essential

- name: ls
run: ls

- name: Install Rust ${{ matrix.rust-branch }}
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: ${{ matrix.rust-branch }}
components: rustfmt
profile: minimal

- name: Setup bittensor repo
run: |
git clone https://github.com/opentensor/bittensor.git
cd bittensor
git checkout staging
python3 -m pip install -e bittensor/
- name: Run E2E tests
run: LOCALNET_SH_PATH="../subtensor/scripts/localnet.sh" pytest tests/e2e_tests/ -s

0 comments on commit d1ee620

Please sign in to comment.