Files
Security_AI_integrated/.gitea/workflows/python-test.yml

34 lines
737 B
YAML

name: Python Test
on:
push:
branches: [ "master", "main" ]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f "requirements.txt" ]; then
pip install -r requirements.txt
fi
pip install pytest
- name: Run tests
run: |
if [ -d "tests" ]; then
pytest tests/ --verbose
else
echo "No tests directory found, skipping tests."
fi