From aa755b910e9b3c45259c2c9df753079357e7e56c Mon Sep 17 00:00:00 2001 From: Ibrahim Suleiman Date: Fri, 10 Oct 2025 13:30:40 +0100 Subject: [PATCH 1/4] chore: add ci for test --- .github/workflows/test.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..54e5af7 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,20 @@ +name: Test Cohort 4 Contracts +on: + push: + pull_request: +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Starknet Foundry + uses: foundry-rs/setup-snfoundry@v3 + + - name: Setup Scarb + uses: software-mansion/setup-scarb@v1 + with: + scarb-lock: ../../Scarb.lock + + - name: Run tests + run: scarb build && scarb run test \ No newline at end of file From 7df98426956f4ecb1f57ffacae2e8ad4e6d9aeb6 Mon Sep 17 00:00:00 2001 From: Ibrahim Suleiman Date: Fri, 10 Oct 2025 13:38:40 +0100 Subject: [PATCH 2/4] chore: add tools version --- .tool-versions | 1 + 1 file changed, 1 insertion(+) create mode 100644 .tool-versions diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..db6183a --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +starknet-foundry 0.48.1 \ No newline at end of file From 439ed48de5e3a1147030557661f5623f532403a6 Mon Sep 17 00:00:00 2001 From: Ibrahim Suleiman Date: Fri, 10 Oct 2025 13:42:42 +0100 Subject: [PATCH 3/4] chore: update test ci name --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 54e5af7..ec90c4e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: Test Cohort 4 Contracts +name: Test Contracts on: push: pull_request: From e99d4f94bf033d9a95095d50ee9011ea2edb0ec8 Mon Sep 17 00:00:00 2001 From: Ibrahim Suleiman Date: Fri, 10 Oct 2025 14:00:25 +0100 Subject: [PATCH 4/4] docs: update readme --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/README.md b/README.md index 55ba66e..f46b457 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,34 @@ # Cairo Bootcamp 5.0 This repository contains all the codes for Cairo Bootcamp 5.0 + +## Set up instructions +To set up this repository, you will need to install [Starkup](https://github.com/software-mansion/starkup). + +StarkUp installs and setup the following packages in your machine: +- Scarb - the Cairo package manager +- Starknet Foundry - the Cairo and Starknet testing framework +- Universal Sierra Compiler - compiler for any ever-existing Sierra version +- Cairo Profiler - profiler for Cairo programming language & Starknet +- Cairo Coverage - utility for coverage reports generation for code written in Cairo programming language +- CairoLS - vscode extension + + +Run the following command to install StarkUp: +```bash +curl --proto '=https' --tlsv1.2 -sSf https://sh.starkup.sh | sh +``` + +## Build and Test Contracts +To build and test the contracts, run the following commands + +**Build contracts** +```bash +scarb build +``` + +**Run contract tests** +```bash +scarb run test +``` + +> `scarb run test` runs `snforge test` under the hood. So you can optionally use `snforge test` to test the contracts \ No newline at end of file