From 80665a39a13ffaeadf92782876a014453b545fd1 Mon Sep 17 00:00:00 2001 From: Klaas Schoute Date: Fri, 26 Apr 2024 15:22:04 +0200 Subject: [PATCH] Update CI tests workflow to use Poetry --- .github/workflows/test.yaml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5552006..c13dd91 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -15,17 +15,21 @@ jobs: steps: - uses: actions/checkout@v3.0.2 + - name: 🏗 Set up Poetry + run: pipx install poetry - name: Set up Python 3.11 uses: actions/setup-python@v4.2.0 with: python-version: 3.11 - - name: Install dependencies + - name: 🏗 Install workflow dependencies run: | - pip install . - pip install -r requirements-test.txt + poetry config virtualenvs.create true + poetry config virtualenvs.in-project true + - name: 🏗 Install dependencies + run: poetry install --no-interaction - name: Lint with flake8 run: | - flake8 forecast_solar - - name: Run tests + poetry run flake8 src/forecast_solar + - name: 🚀 Run pytest run: | - pytest tests + poetry run pytest -v --cov src tests