build yaml init

This commit is contained in:
Logan Alexander 2025-09-20 00:05:22 -07:00
parent e4fe099f8c
commit 7487fc84df

55
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,55 @@
name: CI
on:
push:
branches: [ main, develop, master ]
pull_request:
branches: [ main, develop, master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install Graphviz
run: |
sudo apt-get update
sudo apt-get install -y graphviz
- name: Install project dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install pytest flake8 yamllint || true
- name: Lint YAML
run: |
if command -v yamllint >/dev/null; then
yamllint .
else
echo "yamllint not installed"
fi
- name: Lint Python
run: |
if ls **/*.py >/dev/null 2>&1; then
flake8 .
else
echo "No Python files; skipping flake8"
fi
- name: Run tests
run: |
if [ -d tests ]; then
pytest -q
else
echo "No tests directory; skipping pytest"
fi