disable start button #463
This file contains hidden or 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
| name: test-contracts | |
| on: | |
| pull_request: | |
| paths-ignore: | |
| - "ui/**" | |
| - "**/manifest.json" | |
| - "pnpm-lock.yaml" | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| setup-environment: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up environment | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y curl | |
| sozo-test: | |
| needs: [setup-environment] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v2 | |
| - name: Extract dojo version | |
| run: | | |
| DOJO_VERSION=$(grep '^dojo ' .tool-versions | awk '{print $2}') | |
| echo "DOJO_VERSION=$DOJO_VERSION" >> "$GITHUB_ENV" | |
| - name: Extract scarb version | |
| run: | | |
| SCARB_VERSION=$(grep '^scarb ' .tool-versions | awk '{print $2}') | |
| echo "SCARB_VERSION=$SCARB_VERSION" >> "$GITHUB_ENV" | |
| - name: Download Dojo release artifact | |
| run: | | |
| curl -L -o dojo-linux-x86_64.tar.gz https://github.com/dojoengine/dojo/releases/download/v${{ env.DOJO_VERSION }}/dojo_v${{ env.DOJO_VERSION }}_linux_amd64.tar.gz | |
| tar -xzf dojo-linux-x86_64.tar.gz | |
| sudo mv sozo /usr/local/bin/ | |
| - name: Setup Scarb | |
| uses: software-mansion/setup-scarb@v1 | |
| with: | |
| scarb-version: ${{ env.SCARB_VERSION }} | |
| - name: Run Dojo Build | |
| run: | | |
| cd contracts && sozo build | |
| - name: Run Tests | |
| run: | | |
| cd contracts && sozo test | |
| scarb-fmt: | |
| needs: [setup-environment] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Extract scarb version | |
| run: | | |
| SCARB_VERSION=$(grep '^scarb ' .tool-versions | awk '{print $2}') | |
| echo "SCARB_VERSION=$SCARB_VERSION" >> "$GITHUB_ENV" | |
| - uses: software-mansion/setup-scarb@v1 | |
| with: | |
| scarb-version: ${{ env.SCARB_VERSION }} | |
| - run: cd contracts && scarb fmt --check |