Skip to content

Commit

Permalink
Setting a keyfile manually for testing purposes
Browse files Browse the repository at this point in the history
There is a problem with a solana-keygen new command that I don't know
how to solve. Instead I'm adding a keyfile manually just for the testing
purposes.
  • Loading branch information
dimpar committed Jul 26, 2023
1 parent 7041fbf commit 1f777dd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/cross-chain-solana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,30 +52,29 @@ jobs:
- name: Configure git to not use unauthenticated protocol
run: git config --global url."https://".insteadOf git://

- name: Install Rust
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

- name: Install Solana
run: |
sh -c "$(curl -sSfL https://release.solana.com/v1.16.5/install)"
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
- name: Install Rust
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

- name: Install Anchor
run: |
cargo install --git https://github.com/coral-xyz/anchor --tag v0.28.0 anchor-cli --locked
- name: Install dependencies
run: yarn install

- name: Build contracts
run: |
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
yarn build
- name: Anchor build
run: yarn build

# There is problem with a `solana-keygen new` command. The workaround is to create a keyfile manually just for testing purposes.
- name: Run tests
run: |
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
solana-keygen new
solana config set -u localhost
echo "[132,196,51,204,234,79,135,213,169,81,250,90,73,168,28,41,193,49,153,71,192,44,228,74,230,78,211,95,54,241,137,50,119,155,54,147,229,137,197,57,146,111,140,177,222,54,120,254,254,250,191,135,251,47,163,16,180,160,110,108,54,111,84,76]" >> ~/.config/solana/id.json
yarn test
contracts-format:
Expand Down
4 changes: 2 additions & 2 deletions cross-chain/solana/Anchor.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
seeds = false
skip-lint = false
[programs.localnet]
tbtc = "H5ZSi4XCPyktRH2vLT3eNq6vjZfxnmnkjH7MAGnApkRq"
tbtc = "HksEtDgsXJV1BqcuhzbLRTmXp5gHgHJktieJCtQd3pG"

[registry]
url = "https://api.apr.dev"

[provider]
cluster = "Localnet"
wallet = "/Users/dp/.config/solana/id.json"
wallet = "~/.config/solana/id.json"

[scripts]
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"

0 comments on commit 1f777dd

Please sign in to comment.