Skip to content

Commit

Permalink
ci: split tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pandadefi committed Feb 2, 2023
1 parent 0e85aee commit 5c1cd97
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 60 deletions.
62 changes: 4 additions & 58 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ concurrency:
jobs:
functional:
runs-on: ubuntu-latest
strategy:
matrix:
group: ["base_fee_oracle", "registry", "strategy", "vault"]
steps:
- uses: actions/checkout@v1

Expand Down Expand Up @@ -60,66 +63,9 @@ jobs:
- name: Compile Code
run: brownie compile --size

- name: start anvil
run: anvil --port 8545 & # test hang if started from brownie

- name: Run test functional
id: test_functional
run: brownie test tests/functional --network anvil --ignore=tests/functional/registry/

functional-registry:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: Cache compiler installations
uses: actions/cache@v2
with:
path: |
~/.solcx
~/.vvm/vyper-*
key: ${{ runner.os }}-compiler-cache

- name: Setup node.js
uses: actions/setup-node@v1
with:
node-version: '16.x'

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Set up python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Set pip cache directory path
id: pip-cache-dir-path
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Restore pip cache
uses: actions/cache@v2
id: pip-cache
with:
path: |
${{ steps.pip-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
${{ runner.os }}-pip-
- name: Install python dependencies
run: pip install -r requirements-dev.txt

- name: Compile Code
run: brownie compile --size
- name: start anvil
run: anvil --port 8545 & # test hang if started from brownie

- name: Run test functional registry
id: test_functional_registry
run: brownie test tests/functional/registry/ --network anvil
run: brownie test tests/functional/${{ matrix.group }} --network anvil

integration:
runs-on: ubuntu-latest
Expand Down
5 changes: 3 additions & 2 deletions tests/functional/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ def create_token(decimal=18, behaviour="Normal"):
yield create_token


@pytest.fixture(params=[("Normal", 18), ("NoReturn", 18), ("Normal", 8), ("Normal", 2)])
@pytest.fixture(
params=[("Normal", 18)]
) # , ("NoReturn", 18), ("Normal", 8), ("Normal", 2)])
def token(create_token, request):
# NOTE: Run our test suite using both compliant and non-compliant ERC20 Token
(behaviour, decimal) = request.param
Expand Down Expand Up @@ -81,7 +83,6 @@ def keeper(accounts):
@pytest.fixture(params=["RegularStrategy", "ClonedStrategy"])
def strategy(gov, strategist, keeper, rewards, vault, TestStrategy, request):
strategy = strategist.deploy(TestStrategy, vault)

if request.param == "ClonedStrategy":
# deploy the proxy using as logic the original strategy
tx = strategy.clone(vault, strategist, rewards, keeper, {"from": strategist})
Expand Down

0 comments on commit 5c1cd97

Please sign in to comment.