Skip to content

Commit

Permalink
Merge pull request #18 from lana-shanghai/li/dev/workflows
Browse files Browse the repository at this point in the history
add contracts GH workflow
  • Loading branch information
lana-shanghai authored Dec 5, 2024
2 parents f0338c9 + 6f9ce83 commit f770a39
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/contracts.yml
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

0 comments on commit f770a39

Please sign in to comment.