Skip to content

Commit

Permalink
test: add ci/cd
Browse files Browse the repository at this point in the history
  • Loading branch information
parketh committed Apr 17, 2024
1 parent 67359cc commit f109fba
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Tests and linter

on:
push:
branches: [main]
pull_request:
branches: [main]

env:
SCARB_VERSION: 2.6.3
SNFORGE_VERSION: 0.21.0

jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Scarb
run: |
curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | bash -s -- -v ${{ env.SCARB_VERSION }}
- name: Setup Foundry
run: |
curl -L https://raw.githubusercontent.com/foundry-rs/starknet-foundry/master/scripts/install.sh | sh -s -- -v ${{ env.SNFORGE_VERSION }}
snfoundryup -v ${{ env.SNFORGE_VERSION }}
- name: Add Foundry to PATH
run: echo "PATH=/home/runner/.local/bin:$PATH" >> $GITHUB_ENV

- name: Build and test
working-directory: .
run: |
snforge test --max-n-steps 4294967295
scarb build
2 changes: 1 addition & 1 deletion Scarb.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ edition = "2023_11"
starknet = "2.6.3"
# Imported locally for now, as it is not yet public. Note amm repo needs to be set to same
# version as this repo to build properly.
haiko_amm = { path = "../amm" }
haiko_amm = { git = "https://github.com/haiko-xyz/amm.git", branch = "v2.0.0" }
haiko_lib = { git = "https://github.com/haiko-xyz/library.git", branch = "v2.0.0" }
snforge_std = { git = "https://github.com/foundry-rs/starknet-foundry.git", tag = "v0.21.0" }
openzeppelin = { git = "https://github.com/OpenZeppelin/cairo-contracts.git", tag = "v0.11.0" }
Expand Down

0 comments on commit f109fba

Please sign in to comment.