Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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"
Loading