-
Notifications
You must be signed in to change notification settings - Fork 0
103 lines (85 loc) · 2.98 KB
/
ci.yml
File metadata and controls
103 lines (85 loc) · 2.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: CI
on:
push:
branches: ["**"] # Run on all branches for early feedback
pull_request:
branches: [main] # Run on PRs targeting main
jobs:
# Fast linting job with minimal dependencies
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install lint dependencies only
run: uv sync --group lint
- name: Run code formatting check
run: uv run ruff format --check src/ tests/
- name: Run linting
run: uv run ruff check src/ tests/
# Comprehensive testing job with full test dependencies
test:
runs-on: ubuntu-latest
continue-on-error: true # Don't block workflow on test failures (known flakiness)
strategy:
fail-fast: false # Run all matrix combinations even if one fails
matrix:
python-version: ["3.10", "3.12", "3.13"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install test dependencies only
run: uv sync --group test
- name: Run all tests
run: uv run pytest tests/ -v --log-cli-level=INFO
# Build verification job
build:
runs-on: ubuntu-latest
needs: lint # Only require lint to pass, tests are informational
if: ${{ !cancelled() }} # Run unless workflow was cancelled
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Check CI status
run: |
echo "⚙️ Build proceeding with following status:"
echo " Lint: ${{ needs.lint.result }}"
echo " Tests: Run separately (may have flaky failures)"
echo ""
echo "ℹ️ Note: Tests run but don't block build due to known flakiness"
- name: Build package
run: uv build
- name: Verify package can be installed
run: |
# Create a temporary virtual environment for testing
python -m venv test-install-env
source test-install-env/bin/activate
pip install dist/*.whl
python -c "from arkiv import Arkiv; print('✅ Package installation successful')"