-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding anchor project structure + config base ix (#1)
* Adding anchor project structure + config base ix * [dependencies] use jest utils in top-level to be easily addresable by jest config * [cli] fixing show CLI command on error of refactoring + disable anchor tests for now as it needs more care and testing. Some issues in configuration and system setup. Error like [2023-11-06T11:54:34.078315874Z WARN solana_program_test] No SBF shared objects found. thread 'tokio-runtime-worker' panicked at 'Program file data not available for validator_bonds (vbondsKbsC4QSLQQnn6ngZvkqfywn6KgEeQbkGSpk1V)', /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/solana-program-test-1.16.7/src/lib.rs:675:17 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace FAIL packages/validator-bonds-sdk/__tests__/bankrun/initConfig.spec.ts (8.137 s) Validator Bonds config account tests ✕ init config (1 ms) are not clear as of now
- Loading branch information
Showing
51 changed files
with
8,236 additions
and
1 deletion.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
large-error-threshold = 1000 |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
insert_final_newline = true |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
build/ | ||
packages/**/generated/* | ||
target/types/* |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"extends": "./node_modules/gts/", | ||
"rules": { | ||
"semi": ["error", "never"], | ||
"node/no-extraneous-import": ["error", { | ||
"allowModules": ["@marinade.finance/jest-utils"] | ||
}] | ||
}, | ||
"settings": { | ||
"node": { | ||
// Modules are used by jest dev | ||
"allowModules": ["@jest/globals"] | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Anchor Test | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
anchor-test: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
# from https://github.com/ochaloup/projectserum-build-docker | ||
container: docker.io/ochaloup/projectserum-build:v0.29.0_sol1.16.17_avm | ||
steps: | ||
- name: /root/.cargo to PATH | ||
run: | | ||
echo '/root/.cargo/bin/' >> $GITHUB_PATH | ||
echo '/root/.avm/bin' >> $GITHUB_PATH | ||
ln -s /root/.avm $HOME/ | ||
mkdir -p $HOME/.config | ||
ln -s /root/.config/solana $HOME/.config/ | ||
- name: Info on AVM | ||
run: | | ||
avm list | ||
avm use 0.29.0 | ||
- name: Checkout project | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
|
||
- name: Set nightly toolchain | ||
run: rustup default nightly | ||
- name: List rustup toolchains | ||
run: rustup toolchain list | ||
- name: Check solana config | ||
run: solana config get | ||
|
||
- name: Running tests for project | ||
run: | | ||
pnpm install | ||
pnpm test | ||
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Lint check | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
|
||
- uses: dtolnay/rust-toolchain@stable | ||
|
||
- run: pnpm install | ||
- run: pnpm lint |
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
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.anchor | ||
.DS_Store | ||
target | ||
node_modules | ||
dist | ||
build | ||
test-ledger | ||
|
||
packages/**/generated/* | ||
target/types/* |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
...require('gts/.prettierrc.json'), | ||
bracketSpacing: true, | ||
semi: false | ||
} |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[toolchain] | ||
anchor_version = "0.29.0" | ||
solana_version = "1.16.17" | ||
|
||
[workspace] | ||
types = "packages/validator-bonds-sdk/generated/" | ||
|
||
[features] | ||
seeds = true | ||
skip-lint = false | ||
|
||
[programs.mainnet] | ||
validator_bonds = "vbondsKbsC4QSLQQnn6ngZvkqfywn6KgEeQbkGSpk1V" | ||
|
||
[programs.devnet] | ||
validator_bonds = "vbondsKbsC4QSLQQnn6ngZvkqfywn6KgEeQbkGSpk1V" | ||
|
||
[programs.localnet] | ||
validator_bonds = "vbondsKbsC4QSLQQnn6ngZvkqfywn6KgEeQbkGSpk1V" | ||
|
||
[registry] | ||
url = "https://api.apr.dev" | ||
|
||
[provider] | ||
cluster = "localnet" | ||
wallet = "~/.config/solana/id.json" |
Oops, something went wrong.