Install starknet-devnet with asdf #549
Workflow file for this run
This file contains 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: CI | |
on: | |
pull_request: | |
env: | |
STARKNET_RPC: http://localhost:5050 | |
DEVNET_DUMP_PATH: /devnet-dump.json | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: flutter-actions/setup-flutter@v3 | |
with: | |
channel: stable | |
version: 3.19.5 | |
cache: true | |
cache-sdk: true | |
- uses: bluefireteam/melos-action@v3 | |
- run: melos bootstrap | |
- run: melos format:check | |
- run: melos analyze | |
test-unit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: flutter-actions/setup-flutter@v3 | |
with: | |
channel: stable | |
version: 3.19.5 | |
cache: true | |
cache-sdk: true | |
- uses: bluefireteam/melos-action@v3 | |
- run: melos bootstrap | |
- run: melos test:dart:unit | |
test-integration: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: flutter-actions/setup-flutter@v3 | |
with: | |
channel: stable | |
version: 3.19.5 | |
cache: true | |
cache-sdk: true | |
- uses: bluefireteam/melos-action@v3 | |
- run: melos bootstrap | |
- name: Retrieve starknet devnet version | |
shell: bash | |
run: | | |
grep STARKNET_DEVNET_VERSION .env.devnet | sed 's|export ||g' >> $GITHUB_ENV | |
- name: Run starknet-devnet as a background process | |
run: | | |
docker run -d --name starknet-devnet \ | |
-v ${{ github.workspace }}/assets/devnet-dump.json:$DEVNET_DUMP_PATH \ | |
-p 5050:5050 \ | |
--entrypoint tini \ | |
shardlabs/starknet-devnet-rs:$STARKNET_DEVNET_VERSION -- \ | |
starknet-devnet --host 0.0.0.0 --seed 0 --dump-path $DEVNET_DUMP_PATH | |
sleep 3 # Wait for 3 seconds for the Docker container to initialize | |
- run: melos test:dart:integration | |
- name: Cleanup | |
if: always() | |
run: docker stop starknet-devnet && docker rm starknet-devnet | |
# - name: Setup SSH if failure | |
# if: failure() | |
# uses: lhotari/action-upterm@v1 |