-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add GHA to run snforge test for contracts (#114)
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
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,32 @@ | ||
name: snforge Contract Tests | ||
|
||
on: | ||
pull_request: | ||
branches: ["main"] | ||
paths: | ||
- "src/**" | ||
- "tests/**" | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Scarb | ||
uses: software-mansion/setup-scarb@v1 | ||
with: | ||
scarb-version: "2.3.1" | ||
|
||
- name: Install snforge | ||
run: curl -L https://raw.githubusercontent.com/foundry-rs/starknet-foundry/master/scripts/install.sh | sh | ||
|
||
- name: Run snforge tests | ||
run: snforge test | ||
|
||
- name: Upload test logs on failure | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: test-logs | ||
path: target/snforge/*.log |