Skip to content

Commit 779e35e

Browse files
krisoyekrisoye13claude
authored
ci: enhance GitHub Actions workflow (#12)
- Add workflow_dispatch for manual runs - Make lint job non-blocking with continue-on-error - Add fail-fast: false to run all matrix combinations - Add pip caching for faster builds - Add coverage threshold (80% minimum) Co-authored-by: Krisoye Smith <krisoye@gmail.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 2dcdc0c commit 779e35e

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/test.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ on:
44
push:
55
branches: [main]
66
pull_request:
7+
workflow_dispatch: # Allow manual runs
78

89
jobs:
910
test:
1011
runs-on: ubuntu-latest
1112
strategy:
13+
fail-fast: false # Run all matrix combinations even if one fails
1214
matrix:
1315
python-version: ['3.10', '3.11', '3.12']
1416

@@ -19,6 +21,7 @@ jobs:
1921
uses: actions/setup-python@v5
2022
with:
2123
python-version: ${{ matrix.python-version }}
24+
cache: 'pip'
2225

2326
- name: Install dependencies
2427
run: |
@@ -27,7 +30,7 @@ jobs:
2730
2831
- name: Run tests with coverage
2932
run: |
30-
pytest tests/ -v --cov=src/document_analysis_mcp --cov-report=term --cov-report=xml
33+
pytest tests/ -v --cov=src/document_analysis_mcp --cov-report=term --cov-report=xml --cov-fail-under=80
3134
3235
- name: Upload coverage to Codecov
3336
if: matrix.python-version == '3.12'
@@ -38,13 +41,16 @@ jobs:
3841

3942
lint:
4043
runs-on: ubuntu-latest
44+
# Lint is non-blocking - failures are reported but don't fail the build
45+
continue-on-error: true
4146
steps:
4247
- uses: actions/checkout@v4
4348

4449
- name: Set up Python
4550
uses: actions/setup-python@v5
4651
with:
4752
python-version: '3.12'
53+
cache: 'pip'
4854

4955
- name: Install ruff
5056
run: pip install ruff

0 commit comments

Comments
 (0)