Skip to content

Commit

Permalink
tests: unify tests and DRY up.
Browse files Browse the repository at this point in the history
  • Loading branch information
stas committed Oct 29, 2024
1 parent 688d05c commit ca63d5c
Show file tree
Hide file tree
Showing 13 changed files with 58 additions and 503 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
run: docker build ./ -t velodrome/sugar

- name: Runs code QA and tests for optimism
run: docker run --rm --env-file=env.example -v $(pwd):/app -w /app -t velodrome/sugar sh -c 'flake8 && brownie test tests/optimism/**.py --network=optimism-main'
run: docker run --rm --env-file=env.example -e CHAIN_ID=10 -v $(pwd):/app -w /app -t velodrome/sugar sh -c 'flake8 && brownie test --network=optimism-main'
- name: Runs code QA and tests for base
run: docker run --rm --env-file=env.example -v $(pwd):/app -w /app -t velodrome/sugar sh -c 'flake8 && brownie test tests/base/**.py --network=base-main'
run: docker run --rm --env-file=env.example -e CHAIN_ID=8453 -v $(pwd):/app -w /app -t velodrome/sugar sh -c 'flake8 && brownie test --network=base-main'
- name: Runs code QA and sugar factory registry tests
run: docker run --rm --env-file=env.example -v $(pwd):/app -w /app -t velodrome/sugar sh -c 'flake8 && brownie test tests/test_factory_registry.py --network=mode-main'
run: docker run --rm --env-file=env.example -e CHAIN_ID=34443 -v $(pwd):/app -w /app -t velodrome/sugar sh -c 'flake8 && brownie test --network=mode-main'
1 change: 1 addition & 0 deletions brownie-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ networks:
fork: https://optimism-mainnet.wallet.coinbase.com
evm_version: shanghai
compiler:
evm_version: cancun
vyper:
version: 0.4.0
8 changes: 4 additions & 4 deletions env.example
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ RELAY_REGISTRY_ADDRESSES_10=0xe9F00f2e61CB0c6fb00A2e457546aCbF0fC303C2,0x6b1253B
GOVERNOR_10=0x1F82e10D58aEf03DeA2e478029fB0387A1cbE989

TEST_FACTORY_ADDRESS_10=0xCc0bDDB707055e04e497aB22a59c2aF4391cd12F
TEST_ADDRESS_10=0xEeE7FB850D28f5cabd5f1EDF540646b5bEA17CE5
TEST_ALM_ADDRESS_10=0x892Ff98a46e5bd141E2D12618f4B2Fe6284debac
TEST_ADDRESS_10=0x892ff98a46e5bd141e2d12618f4b2fe6284debac
TEST_ALM_ADDRESS_10=0x892ff98a46e5bd141e2d12618f4b2fe6284debac

LP_SUGAR_ADDRESS_10=0x35F233BE126d7D08aB2D65E647E8c379b1FACF39
REWARDS_SUGAR_ADDRESS_10=
LP_SUGAR_ADDRESS_10=0x2B1D8801731cbd8f4Bdb3198886412cE3a03fe8e
REWARDS_SUGAR_ADDRESS_10=0x797A266fe12a5f844ed42EF1EA3050efB02cBdfa
VE_SUGAR_ADDRESS_10=0x94f913362b232e31daB49a1aFB775cfd25DaA6a1
RELAY_SUGAR_ADDRESS_10=0xb8307e5842B9aeE75C704183F0355076aa74b4e2

Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
eth-brownie @ git+https://github.com/velodrome-finance/[email protected]
vyper==0.4.0
flake8
titanoboa
4 changes: 3 additions & 1 deletion scripts/deploy.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# SPDX-License-Identifier: BUSL-1.1
import os

from brownie import accounts, VeSugar, LpSugar, RelaySugar, FactoryRegistry, RewardsSugar
from brownie import (
accounts, VeSugar, LpSugar, RelaySugar, FactoryRegistry, RewardsSugar
)


def main():
Expand Down
84 changes: 0 additions & 84 deletions tests/base/test_ve_sugar.py

This file was deleted.

260 changes: 0 additions & 260 deletions tests/optimism/test_lp_sugar.py

This file was deleted.

Loading

0 comments on commit ca63d5c

Please sign in to comment.