Skip to content

Commit

Permalink
ci:simplified poetry install
Browse files Browse the repository at this point in the history
  • Loading branch information
heswithme committed Sep 27, 2024
1 parent 96fd1df commit a12876c
Showing 1 changed file with 15 additions and 38 deletions.
53 changes: 15 additions & 38 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,67 +13,44 @@ jobs:
python-version: 3.12.6
- uses: pre-commit/[email protected]

setup_poetry:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python 3.12.6
uses: actions/setup-python@v5
with:
python-version: 3.12.6
- name: Cache Poetry Environment
uses: actions/cache@v4
with:
path: ~/.cache/pypoetry
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Setup Poetry and Install Dependencies
run: |
pip install "poetry>=1.8,<2.0"
poetry config virtualenvs.in-project true
poetry install --no-interaction
pytest:
needs: setup_poetry
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
matrix:
test_type:
- unitary
- hypothesis
test_type: [unitary, hypothesis]
steps:
- uses: actions/checkout@v4
- name: Setup Python and Restore Environment
- name: Setup Python 3.12.6
uses: actions/setup-python@v5
with:
python-version: 3.12.6
- name: Restore Poetry Environment
uses: actions/cache@v4
with:
path: ~/.cache/pypoetry
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Install Poetry
run: |
pip install "poetry>=1.8,<2.0"
poetry config virtualenvs.in-project true
- name: Install dependencies
run: poetry install --no-interaction
- name: Run Pytest
env:
ETH_RPC_URL: ${{ secrets.ETH_RPC_URL }}
run: poetry run pytest --numprocesses=auto --dist=loadscope tests/${{ matrix.test_type }}


foundry_tests:
needs: setup_poetry
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Setup Python and Restore Environment
- name: Setup Python 3.12.6
uses: actions/setup-python@v5
with:
python-version: 3.12.6
- name: Restore Poetry Environment
uses: actions/cache@v4
with:
path: ~/.cache/pypoetry
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Install Poetry
run: |
pip install "poetry>=1.8,<2.0"
poetry config virtualenvs.in-project true
- name: Install dependencies
run: poetry install --no-interaction
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
Expand Down

0 comments on commit a12876c

Please sign in to comment.