-
Notifications
You must be signed in to change notification settings - Fork 281
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #225 from near-examples/reorganize-and-update
Reorganize and update
- Loading branch information
Showing
35 changed files
with
1,541 additions
and
1,917 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,33 +1,13 @@ | ||
name: Tests | ||
on: | ||
repository_dispatch: | ||
types: [tests-report] | ||
push: | ||
on: push | ||
jobs: | ||
tests: | ||
strategy: | ||
matrix: | ||
platform: [ubuntu-latest] # mac-os currently in progress | ||
platform: [ubuntu-latest, macos-latest] | ||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v2 | ||
- name: Install Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
target: wasm32-unknown-unknown | ||
- name: Build wasm files | ||
run: source scripts/flags.sh && rustup target add wasm32-unknown-unknown && cargo build --all --target wasm32-unknown-unknown --release && cp target/wasm32-unknown-unknown/release/*.wasm ./res/ | ||
- name: Run unit tests | ||
env: | ||
IS_GITHUB_ACTION: true | ||
run: cd nft && cargo test -- --nocapture --color=always | ||
- name: Run Rust integration tests | ||
run: cd integration-tests/rs && cargo run --example integration-tests | ||
- name: Run TypeScript integration tests | ||
run: cd integration-tests/ts && npm i && npm run test | ||
- uses: actions/checkout@v4 | ||
- name: Install and test modules | ||
run: | | ||
cargo test |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,24 +1,18 @@ | ||
[profile.release] | ||
codegen-units = 1 | ||
# Tell `rustc` to optimize for small code size. | ||
opt-level = "z" | ||
lto = true | ||
debug = false | ||
panic = "abort" | ||
overflow-checks = true | ||
[package] | ||
name = "non-fungible-token" | ||
version = "1.1.0" | ||
authors = ["Near Inc <[email protected]>"] | ||
edition = "2018" | ||
|
||
[workspace] | ||
# remember to include a member for each contract | ||
members = [ | ||
"nft", | ||
"test-approval-receiver", | ||
"test-token-receiver", | ||
] | ||
exclude = [ | ||
"integration-tests" | ||
] | ||
[lib] | ||
crate-type = ["cdylib", "rlib"] | ||
|
||
# This can be removed when near-sdk is updated | ||
# Unfortuantely, this crate was yanked by the author and this is needed | ||
[patch.crates-io] | ||
parity-secp256k1 = { git = 'https://github.com/paritytech/rust-secp256k1.git' } | ||
[dependencies] | ||
near-sdk = "5.5.0" | ||
near-contract-standards = "5.5.0" | ||
|
||
[dev-dependencies] | ||
near-sdk = { version = "5.5.0", features = ["unit-testing"] } | ||
near-workspaces = { version = "0.14.1", features = ["unstable"] } | ||
anyhow = "1.0" | ||
tokio = { version = "1.41.0", features = ["full"] } |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.