From 2cb74aa313db86a04ad588119d2b781e898fe1ea Mon Sep 17 00:00:00 2001 From: Ibrahim Suleiman Date: Thu, 6 Feb 2025 12:55:23 +0100 Subject: [PATCH] fix: failing build --- .github/workflows/test_contracts.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_contracts.yml b/.github/workflows/test_contracts.yml index e70cf23..e610832 100644 --- a/.github/workflows/test_contracts.yml +++ b/.github/workflows/test_contracts.yml @@ -1,14 +1,25 @@ -name: Test Dojo contracts +name: Build and test Dojo contracts + on: [push, pull_request] jobs: sozo-test: runs-on: ubuntu-latest + env: + DOJO_VERSION: v1.1.2 steps: - uses: actions/checkout@v3 - - run: curl -L https://install.dojoengine.org | bash - - run: /home/runner/.config/.dojo/bin/dojoup -v v1.1.2 + - uses: software-mansion/setup-scarb@v1 + with: + scarb-version: "2.9.2" + - run: | + curl -L https://install.dojoengine.org | bash + /home/runner/.config/.dojo/bin/dojoup -v ${{ env.DOJO_VERSION }} - run: | - cd onchain /home/runner/.config/.dojo/bin/sozo build /home/runner/.config/.dojo/bin/sozo test + if [[ `git status --porcelain` ]]; then + echo The git repo is dirty + echo "Make sure to run \"sozo build\" after changing Scarb.toml" + exit 1 + fi \ No newline at end of file