Add GitHub Actions CI workflow
Browse filesRuns on every push/PR to main:
- Matcher unit tests via pytest (Python 3.11)
- Docker build check for frontend, matcher, and dashboard
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- .github/workflows/ci.yml +59 -0
.github/workflows/ci.yml
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: CI
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches: [ main ]
|
| 6 |
+
pull_request:
|
| 7 |
+
branches: [ main ]
|
| 8 |
+
|
| 9 |
+
jobs:
|
| 10 |
+
test:
|
| 11 |
+
name: Matcher Unit Tests
|
| 12 |
+
runs-on: ubuntu-latest
|
| 13 |
+
|
| 14 |
+
steps:
|
| 15 |
+
- name: Checkout code
|
| 16 |
+
uses: actions/checkout@v4
|
| 17 |
+
|
| 18 |
+
- name: Set up Python 3.11
|
| 19 |
+
uses: actions/setup-python@v5
|
| 20 |
+
with:
|
| 21 |
+
python-version: "3.11"
|
| 22 |
+
cache: pip
|
| 23 |
+
|
| 24 |
+
- name: Install dependencies
|
| 25 |
+
run: |
|
| 26 |
+
pip install -r matcher/requirements.txt
|
| 27 |
+
pip install pytest
|
| 28 |
+
|
| 29 |
+
- name: Run tests
|
| 30 |
+
run: pytest matcher/test_matcher.py -v
|
| 31 |
+
|
| 32 |
+
docker-build:
|
| 33 |
+
name: Docker Build Check
|
| 34 |
+
runs-on: ubuntu-latest
|
| 35 |
+
|
| 36 |
+
steps:
|
| 37 |
+
- name: Checkout code
|
| 38 |
+
uses: actions/checkout@v4
|
| 39 |
+
|
| 40 |
+
- name: Set up Docker Buildx
|
| 41 |
+
uses: docker/setup-buildx-action@v3
|
| 42 |
+
|
| 43 |
+
- name: Build frontend
|
| 44 |
+
uses: docker/build-push-action@v6
|
| 45 |
+
with:
|
| 46 |
+
context: ./frontend
|
| 47 |
+
push: false
|
| 48 |
+
|
| 49 |
+
- name: Build matcher
|
| 50 |
+
uses: docker/build-push-action@v6
|
| 51 |
+
with:
|
| 52 |
+
context: ./matcher
|
| 53 |
+
push: false
|
| 54 |
+
|
| 55 |
+
- name: Build dashboard
|
| 56 |
+
uses: docker/build-push-action@v6
|
| 57 |
+
with:
|
| 58 |
+
context: ./dashboard
|
| 59 |
+
push: false
|