From 7996bf51a065db3d1b2d61ac321dda80c7f89be5 Mon Sep 17 00:00:00 2001 From: jesusgaud Date: Wed, 19 Mar 2025 20:05:42 -0400 Subject: [PATCH] Updated GitHub Action: Additional changes to workflow to ensure successful run --- .github/workflows/python-app.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 29767a5..38c3a12 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -38,14 +38,15 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install flake8 pytest pylint pytest-cov pytest-xdist pytest-timeout pandas + pip install flake8 pytest pylint pytest-cov pytest-xdist pytest-timeout if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Debug - List all files and plugins + - name: Debug - List all files run: | + echo "📂 Listing all files in workspace:" ls -R - ls -R app/plugins - echo "✅ Plugins and files listed" + echo "📂 Checking app/plugins directory:" + ls -R app/plugins || echo "⚠️ No plugins found" - name: Install Project (Editable Mode) run: | @@ -59,22 +60,21 @@ jobs: run: | mkdir -p logs touch logs/app.log - echo "✅ Logs directory initialized" + touch history.csv + echo "id,a,b,operation,result" > history.csv # ✅ Ensure history.csv is not empty + echo "✅ Logs and history file initialized" - - name: Ensure history.csv Exists with Proper Headers + - name: Debug - Check history.csv contents run: | - if [ ! -f history.csv ]; then - echo "a,b,operation,result" > history.csv - echo "1,1,add,2" >> history.csv # Placeholder data - echo "✅ history.csv initialized with placeholder data" - fi + echo "🔍 Checking history.csv contents:" + cat history.csv || echo "⚠️ history.csv is empty!" - name: Run Linter (Pylint) run: | CHANGED_FILES=$(git diff --name-only origin/main | grep '\.py$' || echo "") if [ -n "$CHANGED_FILES" ]; then pylint $CHANGED_FILES --exit-zero; else echo "No Python files changed"; fi - - name: Run Tests with Coverage (Parallel Execution) + - name: Run Tests with Coverage (Sequential Execution to Match Local) run: | - pytest --cov --cov-report=term-missing --cov-fail-under=90 -n auto + pytest --cov --cov-report=term-missing --cov-fail-under=90 echo "✅ Pytest completed"