Skip to content
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

[DRAFT] [DO NOT MERGE] testing new sandbox #376

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
90 changes: 46 additions & 44 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,38 +16,38 @@ env:
RUST_BACKTRACE: short

jobs:
clippy:
runs-on: ubuntu-20.04
# clippy:
# runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v4
- name: Run clippy
run: cargo clippy --all-targets -- -D clippy::all -D clippy::nursery
# steps:
# - uses: actions/checkout@v4
# - name: Run clippy
# run: cargo clippy --all-targets -- -D clippy::all -D clippy::nursery

cargo-fmt:
runs-on: ubuntu-20.04
# cargo-fmt:
# runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v4
- name: Run cargo fmt
run: cargo fmt --check
# steps:
# - uses: actions/checkout@v4
# - name: Run cargo fmt
# run: cargo fmt --check

# there're sometimes warnings, which signal, that the generated doc
# won't look as expected, when rendered, and sometimes errors, which will prevent doc from being
# generated at release time altogether.
cargo-doc:
runs-on: ubuntu-20.04
# # there're sometimes warnings, which signal, that the generated doc
# # won't look as expected, when rendered, and sometimes errors, which will prevent doc from being
# # generated at release time altogether.
# cargo-doc:
# runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v4
- name: run cargo doc
run: RUSTDOCFLAGS="-D warnings" cargo doc
# steps:
# - uses: actions/checkout@v4
# - name: run cargo doc
# run: RUSTDOCFLAGS="-D warnings" cargo doc

test:
needs: cargo-fmt
# needs: cargo-fmt
strategy:
matrix:
platform: [ubuntu-latest, macos-latest]
platform: [macos-latest]
toolchain: [stable]
runs-on: ${{ matrix.platform }}

Expand All @@ -62,26 +62,28 @@ jobs:
- uses: Swatinem/rust-cache@v1
- name: Add wasm32 target
run: rustup target add wasm32-unknown-unknown
- name: Check with stable features
run: cargo check --verbose
- name: Compile sandbox
run: git clone https://github.com/akorchyn/nearcore -b test-fix && cd nearcore && make sandbox && cd -
- name: Sandbox version
run: ./nearcore/target/debug/neard-sandbox -V
- name: Run tests with unstable features
run: NEAR_RPC_TIMEOUT_SECS=100 cargo test --verbose --features unstable
run: NEAR_RPC_TIMEOUT_SECS=100 NEAR_SANDBOX_BIN_PATH=$(pwd)/nearcore/target/debug/neard-sandbox cargo test --verbose --features unstable

release-plz:
runs-on: ubuntu-latest
needs: [clippy, cargo-fmt, cargo-doc, test]
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.MY_GITHUB_TOKEN }}
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Run release-plz
uses: MarcoIeni/[email protected]
env:
# https://release-plz.ieni.dev/docs/github/trigger
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
# release-plz:
# runs-on: ubuntu-latest
# needs: [clippy, cargo-fmt, cargo-doc, test]
# if: github.ref == 'refs/heads/main'
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# token: ${{ secrets.MY_GITHUB_TOKEN }}
# - name: Install Rust toolchain
# uses: dtolnay/rust-toolchain@stable
# - name: Run release-plz
# uses: MarcoIeni/[email protected]
# env:
# # https://release-plz.ieni.dev/docs/github/trigger
# GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
# CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
6 changes: 4 additions & 2 deletions workspaces/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,17 @@ near-gas = { version = "0.3", features = ["serde", "borsh", "schemars"] }
near-token = { version = "0.3", features = ["serde"] }
near-sdk = { version = "5.5", optional = true }
near-account-id = "1.0.0"

near-crypto = "0.26"
near-primitives = "0.26"
near-jsonrpc-primitives = "0.26"
near-jsonrpc-client = { version = "0.13", features = ["sandbox"] }
near-sandbox-utils = "0.10"
near-sandbox-utils = { git = "https://github.com/near/near-sandbox.git", branch = "sandbox-2.2.0" }
near-chain-configs = { version = "0.26", optional = true }

[build-dependencies]
near-sandbox-utils = "0.10"
near-sandbox-utils = { git = "https://github.com/near/near-sandbox.git", branch = "sandbox-2.2.0" }


[target.'cfg(unix)'.dependencies]
libc = "0.2"
Expand Down
Loading