diff --git a/.github/workflows/tests-py.yml b/.github/workflows/tests-py.yml new file mode 100644 index 0000000..81c0064 --- /dev/null +++ b/.github/workflows/tests-py.yml @@ -0,0 +1,27 @@ +name: Tests Contract PY +on: push +jobs: + workflows: + strategy: + matrix: + platform: [ubuntu-latest, macos-latest] + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@v4 + - name: Install uv + run: curl -LsSf https://astral.sh/uv/install.sh | sh + - name: Install Emscripten + run: | + git clone https://github.com/emscripten-core/emsdk.git + cd emsdk + ./emsdk install latest + ./emsdk activate latest + source ./emsdk_env.sh + echo "PATH=$PATH" >> $GITHUB_ENV + - name: Build and test contract + run: | + cd ./contract-py + uv venv + uv sync + uvx nearc contract.py + uv run pytest \ No newline at end of file diff --git a/.github/workflows/tests-ts.yml b/.github/workflows/tests-ts.yml index d070592..a06b46b 100644 --- a/.github/workflows/tests-ts.yml +++ b/.github/workflows/tests-ts.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: - node-version: "18" + node-version: "20" - name: Install and test modules run: | cd ./contract-ts diff --git a/contract-rs/Cargo.toml b/contract-rs/Cargo.toml index 9a984b6..dd51c69 100644 --- a/contract-rs/Cargo.toml +++ b/contract-rs/Cargo.toml @@ -13,11 +13,11 @@ crate-type = ["cdylib", "rlib"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -near-sdk = "5.1.0" +near-sdk = "5.23.0" [dev-dependencies] -near-sdk = { version = "5.1.0", features = ["unit-testing"] } -near-workspaces = { version = "0.16.0", features = ["unstable"] } +near-sdk = { version = "5.23.0", features = ["unit-testing"] } +near-workspaces = { version = "0.22.0", features = ["unstable"] } tokio = { version = "1.12.0", features = ["full"] } serde_json = "1" diff --git a/contract-rs/rust-toolchain.toml b/contract-rs/rust-toolchain.toml index a82ade3..75595da 100644 --- a/contract-rs/rust-toolchain.toml +++ b/contract-rs/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "stable" -components = ["rustfmt"] -targets = ["wasm32-unknown-unknown"] +channel = "1.86.0" +components = ["rustfmt", "clippy", "rust-analyzer"] +targets = ["wasm32-unknown-unknown"] \ No newline at end of file