diff --git a/.github/workflows/cairo_tests.yml b/.github/workflows/cairo_tests.yml new file mode 100644 index 00000000..12e6706c --- /dev/null +++ b/.github/workflows/cairo_tests.yml @@ -0,0 +1,43 @@ +name: Cairo Tests + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build-and-test: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install asdf & tools + uses: asdf-vm/actions/install@v3 + + - name: Install Rust + run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + + - name: Install Scarb + run: | + asdf --version + asdf plugin add scarb + asdf install scarb latest + asdf global scarb latest + scarb --version + + - name: Install Starknet Foundry + run: | + asdf plugin add starknet-foundry + asdf install starknet-foundry 0.32.0 + asdf global starknet-foundry 0.32.0 + snforge --version + + - name: Build Cairo Contracts + run: scarb build + + - name: Run Cairo Tests + run: snforge test