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 2eaa78e commit dc64626
Show file tree
Hide file tree
Showing 13 changed files with 61 additions and 505 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
14 changes: 7 additions & 7 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=0xd0bF8A2e7ECAC81106b3A1A341299E9314219598
REWARDS_SUGAR_ADDRESS_10=0xc4e64A0B93713a9be19B1ccdA408F76923202B73
VE_SUGAR_ADDRESS_10=0x94f913362b232e31daB49a1aFB775cfd25DaA6a1
RELAY_SUGAR_ADDRESS_10=0xb8307e5842B9aeE75C704183F0355076aa74b4e2

Expand All @@ -31,11 +31,11 @@ RELAY_REGISTRY_ADDRESSES_8453=0x05e41604B9463e2224227053980dfF3f57fb6dB5,0xD308a
GOVERNOR_8453=0x94C012A23A8A65A6f40608dA30534a46a433F410

TEST_FACTORY_ADDRESS_8453=0x5e7BB104d84c7CB9B682AaC2F3d509f5F406809A
TEST_ADDRESS_8453=0xEeE7FB850D28f5cabd5f1EDF540646b5bEA17CE5
TEST_ADDRESS_8453=0x892Ff98a46e5bd141E2D12618f4B2Fe6284debac
TEST_ALM_ADDRESS_8453=0x892Ff98a46e5bd141E2D12618f4B2Fe6284debac

LP_SUGAR_ADDRESS_8453=0x63a73829C74e936C1D2EEbE64164694f16700138
REWARDS_SUGAR_ADDRESS_8453=
LP_SUGAR_ADDRESS_8453=0xC9611f3191073EE063a6AFDc6b58b660e8C90afE
REWARDS_SUGAR_ADDRESS_8453=0xEbfD2d983340e0bA6109a387928ADAe9FEE47D4b
VE_SUGAR_ADDRESS_8453=0x4c5d3925fe65DFeB5A079485136e4De09cb664A5
RELAY_SUGAR_ADDRESS_8453=0x8932B5FE23C07Df06533F8f09E43e7cca6a24143

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.

Loading

0 comments on commit dc64626

Please sign in to comment.