From dee89603e5b19248054b447850291106c2bec652 Mon Sep 17 00:00:00 2001 From: Fabien Le Frapper Date: Wed, 15 Jan 2025 15:15:57 +0100 Subject: [PATCH] Install poetry in CI --- .github/workflows/run_tests.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 97f269235..70b7e4d31 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -35,8 +35,19 @@ jobs: run: | sudo apt-get update sudo apt-get install gdal-bin - - name: Install Dependencies - run: pip install --require-hashes --no-deps -r airflow-requirements.txt -r requirements.txt -r dev-requirements.txt + - name: Install poetry + uses: abatilo/actions-poetry@v4 + - name: Setup a local virtual environment (if no poetry.toml file) + run: | + poetry config virtualenvs.create true --local + poetry config virtualenvs.in-project true --local + - uses: actions/cache@v3 + name: Define a cache for the virtual environment based on the dependencies lock file + with: + path: ./.venv + key: venv-${{ hashFiles('poetry.lock') }} + - name: Install the project dependencies + run: poetry install --group dev,airflow - name: Run unit tests run: pytest unit_tests - name: Run integration tests @@ -136,8 +147,6 @@ jobs: - name: Run Playwright tests run: npx playwright test --reporter=list --update-snapshots --shard=${{ matrix.shard }} - - - uses: actions/upload-artifact@v4 if: always() with: