Skip to content

Commit

Permalink
feat: Anchor bankrun (#113)
Browse files Browse the repository at this point in the history
* Skip ignoring spl2.0 dependency issue (#2)

* basics, bankrun seperated

* .ghaignore programs

* npm dependencies fix

* tokens 🚧

* tokens escrow 🚧

* anchor action bug

* anchor action bug

* build errors

* added tokens bankrun

* tokens done

* cargo.toml remove pin
  • Loading branch information
heyAyushh authored Aug 27, 2024
1 parent 8139019 commit 9750528
Show file tree
Hide file tree
Showing 115 changed files with 34,409 additions and 23,241 deletions.
21 changes: 8 additions & 13 deletions .github/.ghaignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,21 @@ tokens/nft-minter/native
tokens/transfer-tokens/native
tokens/spl-token-minter/native
tokens/create-token/native
tokens/create-token/anchor
tokens/nft-minter/anchor
tokens/pda-mint-authority/anchor
tokens/spl-token-minter/anchor

tokens/token-swap/anchor
tokens/transfer-tokens/anchor

# not building
oracles/pyth/anchor

# avm broke hence can't build
# can't use anchor.toml [toolchain] with stable rust
# update these programs to use latest anchor version to fix
tokens/token-2022/group/anchor
tokens/token-2022/immutable-owner/anchor
tokens/token-2022/interest-bearing/anchor
tokens/token-2022/memo-transfer/anchor

# not building
compression/cutils/anchor
compression/cnft-vault/anchor
# builds but need to test on localhost
compression/cnft-burn/anchor

# test failing
# https://github.com/solana-developers/helpers/issues/40
tokens/escrow/anchor

# not live
tokens/token-2022/group/anchor
8 changes: 7 additions & 1 deletion .github/workflows/anchor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,31 +125,37 @@ jobs:
function build_and_test() {
local project=$1
echo "Building and Testing $project"
cd "$project"
cd "$project" || return 1
# Run anchor build
if ! anchor build; then
echo "::error::anchor build failed for $project"
echo "$project: anchor build failed" >> $GITHUB_WORKSPACE/failed_projects.txt
rm -rf target
cd - > /dev/null
return 1
fi
# Install dependencies
if ! pnpm install --frozen-lockfile; then
echo "::error::pnpm install failed for $project"
echo "$project: pnpm install failed" >> $GITHUB_WORKSPACE/failed_projects.txt
cd - > /dev/null
return 1
fi
# Run anchor test
if ! anchor test; then
echo "::error::anchor test failed for $project"
echo "$project: anchor test failed" >> $GITHUB_WORKSPACE/failed_projects.txt
rm -rf target node_modules
cd - > /dev/null
return 1
fi
echo "Build and tests succeeded for $project."
rm -rf target node_modules
cd - > /dev/null
return 0
}
Expand Down
5 changes: 4 additions & 1 deletion basics/account-data/anchor/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"dependencies": {
"@coral-xyz/anchor": "^0.30.0"
"@coral-xyz/anchor": "^0.30.0",
"@solana/web3.js": "^1.95.2"
},
"devDependencies": {
"anchor-bankrun": "^0.4.0",
"solana-bankrun": "^0.3.0",
"@types/bn.js": "^5.1.0",
"@types/chai": "^4.3.0",
"@types/mocha": "^9.0.0",
Expand Down
Loading

0 comments on commit 9750528

Please sign in to comment.