From 7a89179aa25ea2097e4b439771c8e3ef3a4b153a Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Sun, 28 Apr 2024 16:44:56 +0200 Subject: [PATCH] tested if dancing with venv activation/deactivation fixes the path resolution --- .github/workflows/data-cicd.yml | 6 ++++++ .github/workflows/linting.yml | 3 +++ .github/workflows/update-data.yml | 3 +++ 3 files changed, 12 insertions(+) diff --git a/.github/workflows/data-cicd.yml b/.github/workflows/data-cicd.yml index 8627c4bd7..4c2fb132b 100644 --- a/.github/workflows/data-cicd.yml +++ b/.github/workflows/data-cicd.yml @@ -23,10 +23,13 @@ jobs: - name: setup uv run: curl -LsSf https://astral.sh/uv/install.sh | sh - name: Install dependencies + # activating and deactiviating because of https://stackoverflow.com/questions/35045038/how-do-i-use-pytest-with-virtualenv run: | uv venv source .venv/bin/activate uv pip install -r data/requirements.txt -r requirements-dev.txt + deactivate + source .venv/bin/activate - run: pytest data #type-check: # runs-on: ubuntu-latest @@ -39,10 +42,13 @@ jobs: # - name: setup uv # run: curl -LsSf https://astral.sh/uv/install.sh | sh # - name: Install dependencies + # # activating and deactiviating because of https://stackoverflow.com/questions/35045038/how-do-i-use-pytest-with-virtualenv # run: | # uv venv # source .venv/bin/activate # uv pip install -r data/requirements.txt -r requirements-dev.txt + # deactivate + # source .venv/bin/activate # - name: Run mypy # run: mypy --strict data data-build: diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index cec94e21f..68586afd8 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -28,10 +28,13 @@ jobs: - name: setup uv run: curl -LsSf https://astral.sh/uv/install.sh | sh - name: Install python dependencies + # activating and deactiviating because of https://stackoverflow.com/questions/35045038/how-do-i-use-pytest-with-virtualenv run: | uv venv source .venv/bin/activate uv pip install -r data/requirements.txt -r requirements-dev.txt + deactivate + source .venv/bin/activate - name: Run pre-commit continue-on-error: ${{ github.ref == 'refs/heads/main' }} uses: pre-commit/action@v3.0.1 diff --git a/.github/workflows/update-data.yml b/.github/workflows/update-data.yml index 74f2cf880..0d3d9c246 100644 --- a/.github/workflows/update-data.yml +++ b/.github/workflows/update-data.yml @@ -25,10 +25,13 @@ jobs: - name: setup uv run: curl -LsSf https://astral.sh/uv/install.sh | sh - name: Install python dependencies + # activating and deactiviating because of https://stackoverflow.com/questions/35045038/how-do-i-use-pytest-with-virtualenv run: | uv venv source .venv/bin/activate uv pip install -r data/requirements.txt -r requirements-dev.txt + deactivate + source .venv/bin/activate - name: Download data continue-on-error: true # a PR deleting all data will be created if this fails => fail obvious run: |