Skip to content

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

[DRAFT] [DO NOT MERGE] testing new sandbox

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

Workflow file for this run

name: Test & Release
permissions:
pull-requests: write
contents: write
on:
push:
branches: [ main ]
pull_request:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: '-D warnings'
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: short
jobs:
# 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
# cargo-fmt:
# runs-on: ubuntu-20.04
# 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
# steps:
# - uses: actions/checkout@v4
# - name: run cargo doc
# run: RUSTDOCFLAGS="-D warnings" cargo doc
test:
# needs: cargo-fmt
strategy:
matrix:
platform: [macos-latest]
toolchain: [stable]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- name: "${{ matrix.toolchain }}"
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
default: true
- uses: Swatinem/rust-cache@v1
- name: Add wasm32 target
run: rustup target add wasm32-unknown-unknown
- name: Compile sandbox
run: git clone https://github.com/near/nearcore && cd nearcore && git checkout c020ee5bf48c0426b3913497550c2b639c7f7f73 && 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 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 }}