From 3048f165594ac8e5dce43abe888eb93923b42ab5 Mon Sep 17 00:00:00 2001 From: panda <87183122+pandadefi@users.noreply.github.com> Date: Thu, 2 Feb 2023 15:57:03 +0000 Subject: [PATCH 1/2] ci: fix tests --- .github/workflows/lint.yaml | 2 +- .github/workflows/test.yaml | 44 +++++-------------------------------- 2 files changed, 7 insertions(+), 39 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 51553d28..3a91c8b2 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -21,7 +21,7 @@ jobs: - name: Setup node.js uses: actions/setup-node@v1 with: - node-version: '12.x' + node-version: '16.x' - name: Set yarn cache directory path id: yarn-cache-dir-path diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 761d7bf4..911779de 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -12,13 +12,11 @@ concurrency: cancel-in-progress: true jobs: - functional: runs-on: ubuntu-latest strategy: matrix: - group: [1, 2, 3, 4, 5, 6] - + group: ["base_fee_oracle", "registry", "strategy", "vault"] steps: - uses: actions/checkout@v1 @@ -33,7 +31,7 @@ jobs: - name: Setup node.js uses: actions/setup-node@v1 with: - node-version: '14.x' + node-version: '16.x' - name: Install ganache run: npm install -g ganache @@ -59,45 +57,15 @@ jobs: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }} ${{ runner.os }}-pip- - - name: Get Month - id: get-month - run: echo "::set-output name=date::$(/bin/date -u "+%Y%m")" - shell: bash - - - name: Restore duration cache - uses: actions/cache@v2 - id: test_durations_cache - with: - path: .test_durations - key: ${{ runner.os }}-${{ steps.get-month.outputs.date }}-test-durations-cache- - - - name: Check file existence - id: check_test_durations - uses: andstor/file-existence-action@v1 - with: - files: .test_durations - - - name: cat - if: steps.check_test_durations.outputs.files_exists == 'true' - run: cat .test_durations - - name: Install python dependencies run: pip install -r requirements-dev.txt - - - name: Install pytest-split - run: pip install pytest-split - name: Compile Code run: brownie compile --size - - name: Run Splitted Tests - if: steps.check_test_durations.outputs.files_exists == 'true' - run: brownie test tests/functional --gas --coverage --splits 6 --group ${{ matrix.group }}; - - - name: Run build test_duration - if: steps.check_test_durations.outputs.files_exists == 'false' # has to run on all, otherwise the first one that finishes creates an empty cache and lock the cache for others - id: build_cache_duration - run: brownie test tests/functional --store-durations --gas --coverage + - name: Run test functional + id: test_functional + run: brownie test tests/functional/${{ matrix.group }} integration: runs-on: ubuntu-latest @@ -116,7 +84,7 @@ jobs: - name: Setup node.js uses: actions/setup-node@v1 with: - node-version: '12.x' + node-version: '16.x' - name: Install ganache run: npm install -g ganache-cli@6.12.1 From 8603fc803ea5dcfd2baaea625ddc5a3508293c6c Mon Sep 17 00:00:00 2001 From: panda <87183122+pandadefi@users.noreply.github.com> Date: Thu, 2 Feb 2023 16:41:05 +0000 Subject: [PATCH 2/2] chore: bump python versions --- .github/workflows/lint.yaml | 4 ++-- .github/workflows/test.yaml | 8 ++++---- .github/workflows/title.yaml | 2 +- README.md | 10 +++++----- requirements-dev.txt | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 3a91c8b2..ccdfa678 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -68,10 +68,10 @@ jobs: with: fetch-depth: 1 - - name: Set up python 3.8 + - name: Set up python 3.9 uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: 3.9 - name: Set pip cache directory path id: pip-cache-dir-path diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 911779de..8054be8e 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -36,10 +36,10 @@ jobs: - name: Install ganache run: npm install -g ganache - - name: Set up python 3.8 + - name: Set up python 3.9 uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: 3.9 - name: Set pip cache directory path id: pip-cache-dir-path @@ -89,10 +89,10 @@ jobs: - name: Install ganache run: npm install -g ganache-cli@6.12.1 - - name: Set up python 3.8 + - name: Set up python 3.9 uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: 3.9 - name: Set pip cache directory path id: pip-cache-dir-path diff --git a/.github/workflows/title.yaml b/.github/workflows/title.yaml index d283678b..9b546d4f 100644 --- a/.github/workflows/title.yaml +++ b/.github/workflows/title.yaml @@ -17,7 +17,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: 3.9 - name: Install Dependencies run: pip install commitizen diff --git a/README.md b/README.md index 4c14c8b9..1f9e0825 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ on Ethereum. To run the project you need: -- Python 3.8 local development environment and Node.js 10.x development environment for Ganache. +- Python 3.9 local development environment and Node.js 10.x development environment for Ganache. - Brownie local environment setup. See instructions for how to install it [here](https://eth-brownie.readthedocs.io/en/stable/install.html). - Local env variables for [Etherscan API](https://etherscan.io/apis) and @@ -57,13 +57,13 @@ Any command `in code blocks` is meant to be executed from a Mac/Linux terminal o - If you're using the WSL - Wait to install Solidity & Vyper, you'll do this in a later step - Install [Remote - WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) -3. Install [Python 3.8](https://www.python.org/downloads/release/python-380/) +3. Install [Python 3.9](https://www.python.org/downloads/release/python-390/) - Linux: Refer to your distro documentation - - [Mac installer](https://www.python.org/ftp/python/3.8.0/python-3.8.0-macosx10.9.pkg) - - [Windows installer](https://www.python.org/ftp/python/3.8.0/python-3.8.0-amd64.exe) + - [Mac installer](https://www.python.org/ftp/python/3.9.0/python-3.9.0-macosx10.9.pkg) + - [Windows installer](https://www.python.org/ftp/python/3.9.0/python-3.9.0-amd64.exe) 4. [Setup Brownie](https://github.com/eth-brownie/brownie) - `python3 -m pip install --user pipx` - - Note, if get you an error to the effect of python3 not being installed or recognized, run `python --version`, if it returns back something like `Python 3.8.x` then just replace `python3` with `python` for all python commands in these instructions + - Note, if get you an error to the effect of python3 not being installed or recognized, run `python --version`, if it returns back something like `Python 3.9.x` then just replace `python3` with `python` for all python commands in these instructions - `python3 -m pipx ensurepath` - `pipx install eth-brownie` - If you're on Windows (pure Windows, not WSL), you'll need to install the [C++ Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/) before executing this diff --git a/requirements-dev.txt b/requirements-dev.txt index fb4620c0..2e344c3c 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,2 +1,2 @@ -black==22.6.0 -eth-brownie>=1.19.1,<2.0.0 +black==22.10.0 +eth-brownie>=1.19.3,<2.0.0