Files
man-card/.gitea/workflows/ci.yml
7000pctAUTO a082cf1da2
Some checks failed
CI / test (push) Failing after 1s
Robust CI with dynamic path discovery
2026-01-31 22:10:54 +00:00

39 lines
1.1 KiB
YAML

name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Find requirements.txt
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
- name: Setup Python
run: |
python3 -m pip install --upgrade pip
python3 --version
- name: Install dependencies
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