diff --git a/.github/workflows/backend-ci.yml b/.github/workflows/backend-ci.yml index 5afdea9..34e8fb5 100644 --- a/.github/workflows/backend-ci.yml +++ b/.github/workflows/backend-ci.yml @@ -27,8 +27,8 @@ jobs: - name: Install dependencies run: | python -m venv venv - source venv/bin/activate - pip install -r backend/requirements.txt # Ensure all dependencies are installed, including requests + source venv/bin/activate # Ensure the virtual environment is activated + pip install -r backend/requirements.txt # Install all dependencies, including requests - name: Cache Python dependencies uses: actions/cache@v3 @@ -40,9 +40,9 @@ jobs: - name: Run pylint (backend only on changed files) run: | - source venv/bin/activate + source venv/bin/activate # Activate the virtual environment before running pylint changed_files=$(git diff --name-only origin/main...HEAD | grep '^backend/' || true) - + if [ -n "$changed_files" ]; then pylint backend --exit-zero | tee pylint.log SCORE=$(tail -n 2 pylint.log | grep -oP '[0-9]+\.[0-9]+(?=/10)') @@ -71,8 +71,8 @@ jobs: - name: Install dependencies run: | python -m venv venv - source venv/bin/activate # Activate the virtual environment - pip install -r backend/requirements.txt # Ensure all dependencies are installed, including requests + source venv/bin/activate # Ensure the virtual environment is activated + pip install -r backend/requirements.txt # Install dependencies, including requests pip install pytest-html - name: Cache Python dependencies