Skip to content
Open
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
30 changes: 30 additions & 0 deletions .github/workflows/test-tokens-create-token-anchor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Test Tokens Create Token Anchor

on:
push:
paths:
- 'tokens/create-token/anchor/**'
pull_request:
paths:
- 'tokens/create-token/anchor/**'

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install pnpm
run: npm install -g pnpm
- name: Install Rust and Anchor
run: |
curl --proto '=https' --tlsv1.2 -sSfL https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
cargo install --git https://github.com/coral-xyz/anchor avm --locked --force
avm install latest
avm use latest
- name: Build and Test
run: |
cd tokens/create-token/anchor
anchor build
pnpm install
pnpm test
5 changes: 3 additions & 2 deletions tokens/create-token/anchor/Anchor.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
[toolchain]
package_manager = "pnpm"

[features]
resolution = true
skip-lint = false

[programs.localnet]
create_token = "GwvQ53QTu1xz3XXYfG5m5jEqwhMBvVBudPS8TUuFYnhT"
create_token = "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS"

[registry]
url = "https://api.apr.dev"
Expand All @@ -15,7 +16,7 @@ cluster = "localnet"
wallet = "~/.config/solana/id.json"

[scripts]
test = "pnpm ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
test = "mkdir -p target/deploy && cp tests/fixtures/mpl_token_metadata.so target/deploy/ && pnpm ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"

[test]
startup_wait = 5000
Expand Down
18 changes: 11 additions & 7 deletions tokens/create-token/anchor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,22 @@
"@coral-xyz/anchor": "0.32.1"
},
"scripts": {
"postinstall": "zx prepare.mjs"
"pretest": "mkdir -p target/deploy && cp tests/fixtures/mpl_token_metadata.so target/deploy/",
"test": "pnpm run pretest && ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts",
"lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w"
},
"devDependencies": {
"@metaplex-foundation/mpl-token-metadata": "^2.13.0",
"@types/bn.js": "^5.1.0",
"@types/chai": "^4.3.0",
"@types/mocha": "^9.0.0",
"anchor-bankrun": "^0.4.0",
"@types/chai": "^4.3.20",
"@types/mocha": "^9.1.1",
"anchor-bankrun": "^0.5.0",
"chai": "^4.3.4",
"mocha": "^9.0.3",
"solana-bankrun": "^0.3.0",
"ts-mocha": "^10.0.0",
"typescript": "^4.3.5",
"solana-bankrun": "^0.4.0",
"ts-mocha": "^10.1.0",
"ts-node": "^10.9.2",
"typescript": "^4.9.5",
"zx": "^8.1.4"
}
}
Loading