-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from lana-shanghai/li/dev/workflows
add contracts GH workflow
- Loading branch information
Showing
1 changed file
with
45 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,45 @@ | ||
name: Cairo Contracts | ||
|
||
on: [push, pull_request] | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
fmt: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Scarb | ||
uses: software-mansion/setup-scarb@v1 | ||
with: | ||
scarb-version: "2.9.1" | ||
|
||
- name: Check cairo format | ||
run: scarb fmt --check | ||
working-directory: onchain | ||
|
||
- name: Build cairo onchain | ||
run: scarb build | ||
working-directory: onchain | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@main | ||
|
||
- name: Set up Scarb | ||
uses: software-mansion/setup-scarb@v1 | ||
with: | ||
scarb-version: "2.9.1" | ||
|
||
- name: Set up SNForge | ||
uses: foundry-rs/setup-snfoundry@v3 | ||
with: | ||
starknet-foundry-version: "0.34.0" | ||
|
||
- name: Run tests and generate report | ||
run: snforge test | ||
working-directory: onchain |