Skip to content

Merge pull request #59 from Abeeujah/main #142

Merge pull request #59 from Abeeujah/main

Merge pull request #59 from Abeeujah/main #142

name: Build and test AutoSwap contracts
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
RPC_URL: ${{ secrets.RPC_URL }}
jobs:
build:
runs-on: ubuntu-latest
name: build
steps:
- uses: actions/checkout@v3
- name: Set up Scarb
uses: software-mansion/setup-scarb@v1
with:
scarb-version: "2.8.5"
- name: Run build
run: scarb build
test:
runs-on: ubuntu-latest
# environment: autoswappr
name: tests
steps:
- name: Checkout code
uses: actions/checkout@main
- name: Set up Scarb
uses: software-mansion/setup-scarb@v1
with:
scarb-version: "2.8.5"
- name: Set up snforge
uses: foundry-rs/setup-snfoundry@v3
with:
starknet-foundry-version: "0.33.0"
- name: Substitute RPC URL in Scarb.toml
run: |
sed -i "s|\$RPC_URL|$RPC_URL|g" Scarb.toml
- name: Run tests
run: snforge test