Migration to new starknet.js V6 #1
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: Tests | |
env: | |
DEVNET_SHA: "c6ffb99" | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
pull_request: | |
branches: | |
- main | |
- develop | |
workflow_dispatch: | |
jobs: | |
run-tests: | |
# This job runs on Ubuntu-latest, but you can choose other runners if needed | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x, 18.x] # Define Node.js versions to test against | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- uses: actions/checkout@v3 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'yarn' # Caches dependencies to speed up workflows | |
- name: Install dependencies | |
run: yarn install # Installs dependencies defined in package.json | |
- name: Install Devnet | |
run: cargo install --locked --git https://github.com/0xSpaceShard/starknet-devnet-rs.git --rev ${{ env.DEVNET_SHA }} | |
- name: Run Devnet | |
run: starknet-devnet --seed 0 | |
- name: Run tests | |
run: yarn test # Runs your test script defined in package.json |