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
30 changes: 30 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.12"]
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Run tests
run: python3 -m unittest discover -s tests -v
- name: Install coverage
if: matrix.python-version == '3.12'
run: pip install coverage
- name: Run tests with coverage
if: matrix.python-version == '3.12'
run: |
python3 -m coverage run -m unittest discover -s tests
python3 -m coverage report --show-missing
python3 -m coverage xml -o coverage.xml
- name: Upload coverage to Codecov
if: matrix.python-version == '3.12' && github.event_name == 'push'
uses: codecov/codecov-action@v5
with:
files: coverage.xml
fail_ci_if_not_uploaded: false
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
*.swo
*~

# Python
__pycache__/
*.pyc

# Environment
.env
.env.local
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ INTEGRATION_BRANCH = dev
include Makefile.agents.mk

.DEFAULT_GOAL := help
.PHONY: help check dev sync bump-patch bump-minor bump-major set-version deploy-preview deploy-prod
.PHONY: help check dev sync test bump-patch bump-minor bump-major set-version deploy-preview deploy-prod

help:
@echo "Usage: make <target>"
Expand All @@ -16,6 +16,7 @@ help:
@echo " check Validate skill placeholders against config"
@echo " dev Preview sync output (dry run)"
@echo " sync Regenerate adapter output from skills/"
@echo " test Run the sync engine test suite"
@echo ""
@echo "Git workflow (from Makefile.agents.mk)"
@echo " branch name=X Create feature branch from $(INTEGRATION_BRANCH)"
Expand Down Expand Up @@ -46,6 +47,10 @@ dev:
sync:
./sync.py

# Run the sync engine test suite.
test:
python3 -m unittest discover -s tests -v

# Bump the patch segment (X.Y.Z → X.Y.Z+1), commit, and tag.
bump-patch:
@v=$$(cat VERSION); \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![Code Cannon](.github/assets/readme-header.png)

[![CI](https://github.com/LightbridgeLab/CodeCannon/actions/workflows/sync-check.yml/badge.svg)](https://github.com/LightbridgeLab/CodeCannon/actions/workflows/sync-check.yml) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) [![GitHub release](https://img.shields.io/github/v/release/LightbridgeLab/CodeCannon)](https://github.com/LightbridgeLab/CodeCannon/releases) [![Last Commit](https://img.shields.io/github/last-commit/LightbridgeLab/CodeCannon)](https://github.com/LightbridgeLab/CodeCannon/commits) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](docs/contributing.md) [![Python](https://img.shields.io/badge/Python-3.x-blue?logo=python&logoColor=white)](sync.py) [![Install](https://img.shields.io/badge/install-git%20submodule-blue?logo=git&logoColor=white)](https://github.com/LightbridgeLab/CodeCannon#quick-start)
[![CI](https://github.com/LightbridgeLab/CodeCannon/actions/workflows/sync-check.yml/badge.svg)](https://github.com/LightbridgeLab/CodeCannon/actions/workflows/sync-check.yml) [![Tests](https://github.com/LightbridgeLab/CodeCannon/actions/workflows/test.yml/badge.svg)](https://github.com/LightbridgeLab/CodeCannon/actions/workflows/test.yml) [![codecov](https://codecov.io/gh/LightbridgeLab/CodeCannon/branch/main/graph/badge.svg)](https://codecov.io/gh/LightbridgeLab/CodeCannon) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) [![GitHub release](https://img.shields.io/github/v/release/LightbridgeLab/CodeCannon)](https://github.com/LightbridgeLab/CodeCannon/releases) [![Last Commit](https://img.shields.io/github/last-commit/LightbridgeLab/CodeCannon)](https://github.com/LightbridgeLab/CodeCannon/commits) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](docs/contributing.md) [![Python](https://img.shields.io/badge/Python-3.x-blue?logo=python&logoColor=white)](sync.py) [![Install](https://img.shields.io/badge/install-git%20submodule-blue?logo=git&logoColor=white)](https://github.com/LightbridgeLab/CodeCannon#quick-start)

# Code Cannon

Expand Down
Empty file added tests/__init__.py
Empty file.
Loading
Loading