Skip to content

Commit

Permalink
Merge pull request #11 from step-finance/SF-3452-ata-rescue
Browse files Browse the repository at this point in the history
SF-3452 rescue ata funds
  • Loading branch information
aaronovz1 authored Nov 10, 2023
2 parents 678a12e + a79f87f commit 9a9cf95
Show file tree
Hide file tree
Showing 12 changed files with 2,897 additions and 5,689 deletions.
31 changes: 7 additions & 24 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,32 @@ version: 2.1
jobs:
formatting:
docker:
- image: glacialengineering/solana-build:0.21.0.1
- image: backpackapp/build:v0.28.0
steps:
- checkout
- run:
name: "Format rust code"
command: "cargo fmt --all -- --check"
- run:
name: "Check rust code"
command: "cargo clippy -- -D warnings --warn clippy::all"
security-check:
docker:
- image: glacialengineering/solana-build:0.21.0.1
steps:
- checkout
# - run:
# name: "Soteria analysis"
# command: "cd programs/`ls programs/` && soteria -analyzeAll ."
- run:
name: "Cargo audit"
command: "cargo audit"
command: "cargo clippy -- -D warnings --warn clippy::all -A clippy::result-large-err"
test:
docker:
- image: glacialengineering/solana-build:0.21.0.1
- image: backpackapp/build:v0.28.0
steps:
- checkout
- run:
name: "Unit tests"
command: "cargo test --lib"
- run:
name: "Anchor tests"
command: |
yarn install
solana-keygen new -s --no-bip39-passphrase
npm install
anchor test -- --features local-testing,test-id
- store_artifacts:
path: /root/project/.anchor/program-logs
destination: program-logs
build:
docker:
- image: glacialengineering/solana-build:0.21.0.1
- image: backpackapp/build:v0.28.0
steps:
- checkout
- run:
Expand All @@ -59,19 +45,17 @@ jobs:
destination: types
deploy-devnet:
docker:
- image: glacialengineering/solana-build:0.21.0.1
- image: backpackapp/build:v0.28.0
steps:
- checkout
- run:
name: "Deploy"
command: |
echo "$SOLANA_DEV_PROGRAM_KEY" > program-key.json
echo "$SOLANA_DEV_AUTHORITY_KEY" > auth-key.json
anchor build -- --features test-id
export PGM=`ls ./target/deploy/*.so`
echo "deploying $PGM"
solana program deploy -u d -k ./auth-key.json --program-id ./program-key.json $PGM
solana program deploy -u d -k ./auth-key.json --program-id Stk5NCWomVN3itaFjLu382u9ibb5jMSHEsh6CuhaGjB $PGM
workflows:
dev-deploy:
when:
Expand All @@ -91,6 +75,5 @@ workflows:
equal: [ dev-deploy, << pipeline.git.branch >> ]
jobs:
- formatting
- security-check
- test
- build
6 changes: 4 additions & 2 deletions Anchor.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
anchor_version = "0.21.0"
[features]
seeds = true
skip-lint = false

[workspace]
members = ["programs/step-staking"]
Expand All @@ -11,7 +13,7 @@ cluster = "localnet"
wallet = "~/.config/solana/id.json"

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

[programs.localnet]
step_staking = "TesT35sGptoswsVkcLpUUe6U2iTJZE59on1Jno8Vdpg"
Expand Down
Loading

0 comments on commit 9a9cf95

Please sign in to comment.