This commit is contained in:
@@ -5,35 +5,30 @@ jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Find requirements.txt
|
||||
- name: Debug environment
|
||||
run: |
|
||||
find . -name "requirements.txt" -type f 2>/dev/null | head -5
|
||||
|
||||
- name: Find tests directory
|
||||
run: |
|
||||
find . -type d -name "tests" 2>/dev/null | head -5
|
||||
echo "=== Current directory ==="
|
||||
pwd
|
||||
echo ""
|
||||
echo "=== Directory contents ==="
|
||||
ls -la
|
||||
echo ""
|
||||
echo "=== Looking for requirements.txt ==="
|
||||
find . -name "requirements.txt" 2>/dev/null || echo "Not found"
|
||||
echo ""
|
||||
echo "=== Looking for tests directory ==="
|
||||
find . -type d -name "tests" 2>/dev/null || echo "Not found"
|
||||
|
||||
- name: Setup Python
|
||||
run: |
|
||||
python3 -m pip install --upgrade pip
|
||||
python3 -m pip install --upgrade pip 2>&1
|
||||
|
||||
- name: Check Python
|
||||
run: |
|
||||
which python3
|
||||
python3 --version
|
||||
|
||||
- name: Install dependencies
|
||||
- name: Install and test
|
||||
run: |
|
||||
REQ=$(find . -name "requirements.txt" -type f 2>/dev/null | head -1)
|
||||
if [ -n "$REQ" ] && [ -f "$REQ" ]; then
|
||||
echo "Installing from $REQ"
|
||||
pip3 install -r "$REQ"
|
||||
else
|
||||
echo "No requirements.txt found"
|
||||
fi
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
TEST_DIR=$(find . -type d -name "tests" 2>/dev/null | head -1)
|
||||
if [ -n "$TEST_DIR" ] && [ -d "$TEST_DIR" ]; then
|
||||
echo "Running tests from $TEST_DIR"
|
||||
pytest3 "$TEST_DIR" -v
|
||||
else
|
||||
echo "No tests directory found"
|
||||
fi
|
||||
pip3 install click fpdf2 Pillow rich python-dotenv pytest pytest-cov 2>&1
|
||||
echo "Installation completed"
|
||||
Reference in New Issue
Block a user