Skip to content

Commit

Permalink
Use poetry in github workflows instead of pip.
Browse files Browse the repository at this point in the history
  • Loading branch information
AnotherSamWilson committed Jul 27, 2024
1 parent 799a9c4 commit f300daf
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,30 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

# install & configure poetry
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

# load cached venv if cache exists
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}

# install dependencies if cache does not exist
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest mypy codecov pytest-cov pandas
pip install plotnine matplotlib scipy scikit-learn
pip install lightgbm pyarrow black isort dill
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root

# install root project
- name: Install project
run: poetry install --no-interaction --with dev

- name: MyPy Checks
run: mypy miceforest --ignore-missing-imports
Expand Down

0 comments on commit f300daf

Please sign in to comment.