Skip to content

Commit

Permalink
workflow: test for smart contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
Eduardo committed Jun 11, 2024
1 parent a20de7f commit d425874
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/test contract.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Next.js CI

on:
push:
paths:
- "packages/snfoundry/contracts/**"
pull_request:
paths:
- "packages/snfoundry/contracts/**"

jobs:
snfoundry:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master

- name: Install scarb
run: curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh -s -- -v 2.5.4

- name: Install snfoundryup
run: curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/snfoundryup/install.sh | sh -s -- -v 0.23.0

- name: Run snforge tests
run: snforge test
working-directory: ./packages/snfoundry/contracts
1 change: 1 addition & 0 deletions packages/snfoundry/contracts/src/YourContract.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ mod YourContract {
self.eth_token.read().transfer(self.ownable.owner(), balance);
}
fn premium(self: @ContractState) -> bool {
println!("test");
self.premium.read()
}
}
Expand Down

0 comments on commit d425874

Please sign in to comment.