Skip to content

Commit 48f6401

Browse files
chore: add js test for create-and-update (#18)
* wip * wip * add ts test for create-and-update * add ts test to ci
1 parent 410e09f commit 48f6401

13 files changed

Lines changed: 2723 additions & 54 deletions

File tree

.github/workflows/typescript-tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
matrix:
2828
example:
2929
- counter/anchor
30+
- create-and-update
3031
- basic-operations/anchor/burn
3132
- basic-operations/anchor/create
3233
- basic-operations/anchor/update
@@ -42,7 +43,7 @@ jobs:
4243
node-version: ${{ env.NODE_VERSION }}
4344
solana-cli-version: ${{ env.SOLANA_CLI_VERSION }}
4445
rust-toolchain: ${{ env.RUST_TOOLCHAIN }}
45-
photon-indexer: 'true'
46+
photon-indexer: "true"
4647

4748
- name: Install dependencies
4849
working-directory: ${{ matrix.example }}

create-and-update/Anchor.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[toolchain]
2+
anchor_version = "0.31.1"
3+
4+
[features]
5+
resolution = true
6+
skip-lint = false
7+
8+
[programs.localnet]
9+
create_and_update = "J6K7nvoVpJHfH13zn47vptnZo1JdUGCGSiVmtfkzz9NA"
10+
11+
[registry]
12+
url = "https://api.apr.dev"
13+
14+
[provider]
15+
cluster = "localnet"
16+
wallet = "~/.config/solana/id.json"
17+
18+
[scripts]
19+
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
20+

create-and-update/Cargo.lock

Lines changed: 66 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

create-and-update/Cargo.toml

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,15 @@
1-
[package]
2-
name = "create-and-update"
3-
version = "0.1.0"
4-
edition = "2021"
5-
6-
[lib]
7-
crate-type = ["cdylib", "lib"]
8-
name = "create_and_update"
9-
10-
[features]
11-
default = []
12-
test-sbf = []
13-
14-
[dependencies]
15-
anchor-lang = "0.31.1"
16-
borsh = "0.10.4"
17-
light-sdk = { version = "0.16.0" , features = ["anchor", "v2"] }
18-
light-hasher = "5.0.0"
19-
light-sdk-types = { version = "0.16.0" , features = ["v2"] }
20-
21-
[dev-dependencies]
22-
light-program-test = { version = "0.16.0" , features = ["v2"] }
23-
light-client = { version = "0.16.0" , features = ["v2"] }
24-
tokio = "1.43.0"
25-
solana-sdk = "2.2"
26-
serial_test = "3.2.0"
1+
[workspace]
2+
members = [
3+
"programs/create-and-update",
4+
]
5+
resolver = "2"
6+
7+
[profile.release]
8+
overflow-checks = true
9+
lto = "fat"
10+
codegen-units = 1
11+
12+
[profile.release.build-override]
13+
opt-level = 3
14+
incremental = false
15+
codegen-units = 1

0 commit comments

Comments
 (0)