From e9eaabefadfa561f80b8ebe9266a1ede911be939 Mon Sep 17 00:00:00 2001 From: Daniel Schiavini Date: Wed, 22 Nov 2023 11:02:41 +0100 Subject: [PATCH] Build fixes --- .github/workflows/.pre-commit-config.yaml | 4 ++-- .github/workflows/main.yaml | 2 +- Dockerfile | 4 ++-- docker-compose.yaml | 1 - tests/conftest.py | 4 +--- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/.pre-commit-config.yaml b/.github/workflows/.pre-commit-config.yaml index f0da0b1..0ae2959 100644 --- a/.github/workflows/.pre-commit-config.yaml +++ b/.github/workflows/.pre-commit-config.yaml @@ -9,10 +9,10 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Setup Python 3.10.13 + - name: Setup Python uses: actions/setup-python@v4 with: - python-version: 3.10.13 + python-version: 3.11 - name: Pre-commit checks uses: pre-commit/action@v3.0.0 diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 8e2ea13..205d557 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -26,4 +26,4 @@ jobs: - name: Run Tests run: pytest env: - DRPC_KEY: ${{ secrets.DRPC_KEY }} + RPC_ETHEREUM: ${{ secrets.RPC_ETHEREUM }} diff --git a/Dockerfile b/Dockerfile index d00544c..c1ffcff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,9 +7,9 @@ RUN pip install --upgrade pip && \ pip install --no-cache-dir -r requirements.txt FROM base as pre-commit -RUN apt-get update && apt-get install git +RUN apt-get update && apt-get install -y git COPY . . -CMD pre-commit run --all-files +CMD git add . && pre-commit run --all-files FROM base as test COPY . . diff --git a/docker-compose.yaml b/docker-compose.yaml index c1dd6ef..646c066 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -13,6 +13,5 @@ services: context: ./ target: pre-commit container_name: metaregistry-pre-commit - command: pre-commit run --all-files volumes: - ./:/usr/app diff --git a/tests/conftest.py b/tests/conftest.py index 1c83303..2874ba5 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -29,9 +29,7 @@ def pytest_sessionstart(): global ALL_POOLS # connect to the network. TODO: use Drpc-Key header instead of GET param - boa.env.fork( - f"https://lb.drpc.org/ogrpc?network=ethereum&dkey={environ['DRPC_KEY']}" - ) + boa.env.fork(url=environ["RPC_ETHEREUM"]) # store instance of registries globally, so we don't have to recreate multiple times when generating tests. # TODO: Can we move these to fixtures?