Skip to content
Merged
Show file tree
Hide file tree
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
File renamed without changes.
44 changes: 44 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Run Tests

on:
push:
branches: [ 'main' ]
pull_request:
branches: [ '*' ]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11','3.12','3.13']

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install graphviz
run: |
sudo apt-get update
sudo apt-get install -y graphviz graphviz-dev

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"

- name: Run tests
run: |
pytest tests/ --cov=AFL.double_agent --cov-report=xml --cov-report=term

- name: Create Coverage Summary
if: matrix.python-version == '3.11'
run: |
COVERAGE=$(python -c "import xml.etree.ElementTree as ET; print(round(float(ET.parse('coverage.xml').getroot().get('line-rate')) * 100))")
echo "::notice title=Code Coverage::Total coverage is $COVERAGE%"
echo "## Test Coverage Summary" >> $GITHUB_STEP_SUMMARY
echo "Total coverage: **$COVERAGE%**" >> $GITHUB_STEP_SUMMARY
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Dev
dev/
# Dev
dev/
AFL/double_agent/_version.py
venv/
.DS_Store
Expand All @@ -11,7 +13,7 @@ venv/
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
`

# Cursor
.cursor/
.cursor-cache/
Expand Down Expand Up @@ -44,5 +46,4 @@ htmlcov/
__pycache__/
.cache/
*pyc
*egg-info*

*egg-info*
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
}
Loading
Loading