chore: merge PR #58 from sprtd/main #144
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
ame: Build and test AutoSwap contracts | ||
Check failure on line 1 in .github/workflows/test_contracts.yml GitHub Actions / .github/workflows/test_contracts.ymlInvalid workflow file
Check failure on line 1 in .github/workflows/test_contracts.yml GitHub Actions / .github/workflows/test_contracts.ymlInvalid workflow file
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
env: | ||
RPC_URL: ${{ vars.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 |