add tail #18
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: Starknet Tests | ||
| on: | ||
| push: | ||
| branches: [ dev ] | ||
| paths: | ||
| - 'chains/starknet/**' | ||
| pull_request: | ||
| branches: [ dev ] | ||
| paths: | ||
| - 'chains/starknet/**' | ||
| jobs: | ||
| run-starknet-tests: | ||
| name: Run Starknet Tests | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout Repository | ||
| uses: actions/checkout@v4 | ||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 | ||
| - name: Install Dependencies | ||
| working-directory: chains/starknet/tests | ||
| run: | | ||
| rm -f package-lock.json | ||
| npm install | ||
| npm install typescript ts-node @types/node starknet | ||
| - name: Setup Rust | ||
| uses: dtolnay/rust-toolchain@stable | ||
| - name: Install Starkli | ||
| run: | | ||
| curl https://get.starkli.sh | sh | ||
| echo "$HOME/.starkli/bin" >> $GITHUB_PATH | ||
| - name: Install Dojo (Katana) | ||
| run: | | ||
| curl -L https://install.dojoengine.org | bash | ||
| source "$HOME/.config/.dojo/env" | ||
| # Install the latest stable version of dojo | ||
| dojoup install stable | ||
| echo "$HOME/.config/.dojo/bin" >> $GITHUB_PATH | ||
| - name: Install Scarb | ||
| run: | | ||
| curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh | ||
| echo "$HOME/.scarb/bin" >> $GITHUB_PATH | ||
| - name: Run Katana | ||
| run: | | ||
| export PATH="$HOME/.config/.dojo/bin:$PATH" | ||
| katana --dev --dev.no-fee | ||
| wait-on: http://127.0.0.1:5050 | ||
| tail: true | ||
| - name: Compile Starknet Contracts | ||
| working-directory: chains/starknet/tests | ||
| run: | | ||
| npm run build | ||
| - name: Run Starknet Tests | ||
| working-directory: chains/starknet/tests | ||
| run: | | ||
| npx ts-node starknet_tests.ts | ||