Skip to content

Commit 5eb38a6

Browse files
sidmohan0claude
andcommitted
refactor(ci): streamline GitHub Actions workflows and fix pre-commit integration
- Remove redundant workflows (lint.yml, tests.yml, branch-specific CI/CD) - Add unified ci.yml workflow for all branches with pre-commit, tests, and wheel size checks - Add pre-commit-auto-fix.yml to automatically fix formatting issues on PRs - Update wheel_size.yml to use Python script and latest action versions - Update publish-pypi.yml to use latest action versions - Fix wheel_size.yml to target 'dev' instead of 'develop' branch - Add benchmark_env/ and notes/ to .gitignore - Install pre-commit hooks locally to prevent GitHub failures This eliminates workflow redundancy and provides better developer experience with automatic pre-commit issue resolution. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 675d29b commit 5eb38a6

File tree

11 files changed

+129
-410
lines changed

11 files changed

+129
-410
lines changed

.github/workflows/beta-cicd.yml

Lines changed: 0 additions & 81 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, dev, "feature/*", "fix/*", "chore/*"]
6+
pull_request:
7+
branches: [main, dev]
8+
9+
jobs:
10+
pre-commit:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-python@v5
15+
with:
16+
python-version: "3.10"
17+
cache: "pip"
18+
- name: Install pre-commit
19+
run: pip install pre-commit
20+
- name: Run pre-commit
21+
run: pre-commit run --all-files --show-diff-on-failure
22+
23+
test:
24+
runs-on: ubuntu-latest
25+
strategy:
26+
matrix:
27+
python-version: ["3.10", "3.11", "3.12"]
28+
steps:
29+
- uses: actions/checkout@v4
30+
- name: Set up Python ${{ matrix.python-version }}
31+
uses: actions/setup-python@v5
32+
with:
33+
python-version: ${{ matrix.python-version }}
34+
cache: "pip"
35+
36+
- name: Install Tesseract OCR
37+
run: |
38+
sudo apt-get update
39+
sudo apt-get install -y tesseract-ocr libtesseract-dev
40+
41+
- name: Install dependencies
42+
run: |
43+
python -m pip install --upgrade pip
44+
pip install -e .
45+
pip install -r requirements-dev.txt
46+
47+
- name: Run tests
48+
run: |
49+
python -m pytest tests/ --cov=datafog --cov-report=xml --cov-report=term
50+
51+
- name: Upload coverage
52+
uses: codecov/codecov-action@v4
53+
with:
54+
file: ./coverage.xml
55+
token: ${{ secrets.CODECOV_TOKEN }}
56+
57+
wheel-size:
58+
runs-on: ubuntu-latest
59+
steps:
60+
- uses: actions/checkout@v4
61+
- uses: actions/setup-python@v5
62+
with:
63+
python-version: "3.10"
64+
cache: "pip"
65+
66+
- name: Install build dependencies
67+
run: |
68+
python -m pip install --upgrade pip
69+
pip install build wheel
70+
71+
- name: Build wheel
72+
run: python -m build --wheel
73+
74+
- name: Check wheel size
75+
run: python scripts/check_wheel_size.py

.github/workflows/dev-cicd.yml

Lines changed: 0 additions & 84 deletions
This file was deleted.

.github/workflows/feature-cicd.yml

Lines changed: 0 additions & 81 deletions
This file was deleted.

.github/workflows/lint.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)