Migrate a few tests to use devnet #537
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 | |
# services: | |
# devnet: | |
# options: --name devnet-service | |
# image: shardlabs/starknet-devnet-rs:0.0.5 | |
# ports: | |
# - 5050:5050 | |
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: docker cp ./assets/devnet-dump.json devnet-service:devnet-dump.json | |
- name: Run starknet-devnet as a background process | |
run: | | |
docker run -d --name starknet-devnet \ | |
-v ${{ github.workspace }}/assets/devnet-dump.json:/devnet-dump.json \ | |
-p 5050:5050 \ | |
--entrypoint tini \ | |
shardlabs/starknet-devnet-rs:0.0.5 -- \ | |
starknet-devnet --host 0.0.0.0 --seed 0 --dump-path /devnet-dump.json | |
- run: curl http://localhost:5050/predeployed_accounts | |
- run: melos test:dart:integration | |
- name: Cleanup | |
if: always() | |
run: docker stop starknet-devnet && docker rm starknet-devnet |