Skip to content

Commit 8fc9c88

Browse files
ritwik-gclaude
andcommitted
Add CI workflows for automated testing
- Add comprehensive CI workflow with matrix testing across OS and Python versions - Test on Ubuntu, macOS, and Windows with Python 3.8-3.12 - Include linting with ruff and format checking - Add Helm plugin installation test - Include code coverage reporting (ready for Codecov) - Add simpler CI workflow example as alternative 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 235eb07 commit 8fc9c88

File tree

2 files changed

+147
-0
lines changed

2 files changed

+147
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Alternative simpler CI workflow - rename to ci.yml if you prefer this approach
2+
3+
name: CI
4+
5+
on:
6+
push:
7+
branches: [ main ]
8+
pull_request:
9+
branches: [ main ]
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
python-version: ["3.8", "3.12"] # Test min and max supported versions
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
26+
- name: Install uv
27+
uses: astral-sh/setup-uv@v5
28+
29+
- name: Install dependencies
30+
run: uv sync --all-extras --dev
31+
32+
- name: Run tests
33+
run: |
34+
uv run pytest -v --cov=helm_values_manager --cov-report=term-missing
35+
36+
- name: Check code quality
37+
if: matrix.python-version == '3.12'
38+
run: |
39+
uv run ruff check .
40+
uv run ruff format --check .

.github/workflows/ci.yml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [ubuntu-latest, macos-latest, windows-latest]
16+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
17+
exclude:
18+
# Skip some combinations to reduce CI time
19+
- os: macos-latest
20+
python-version: "3.8"
21+
- os: macos-latest
22+
python-version: "3.9"
23+
- os: windows-latest
24+
python-version: "3.8"
25+
- os: windows-latest
26+
python-version: "3.9"
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- name: Set up Python ${{ matrix.python-version }}
32+
uses: actions/setup-python@v5
33+
with:
34+
python-version: ${{ matrix.python-version }}
35+
36+
- name: Install uv
37+
uses: astral-sh/setup-uv@v5
38+
with:
39+
version: "0.5.14"
40+
41+
- name: Install dependencies
42+
run: |
43+
uv sync --all-extras --dev
44+
45+
- name: Run unit tests
46+
run: |
47+
uv run pytest tests/ -v --cov=helm_values_manager --cov-report=xml --cov-report=term
48+
49+
- name: Run integration tests
50+
run: |
51+
uv run pytest tests/test_integration.py -v
52+
53+
- name: Upload coverage to Codecov
54+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
55+
uses: codecov/codecov-action@v4
56+
with:
57+
token: ${{ secrets.CODECOV_TOKEN }}
58+
file: ./coverage.xml
59+
flags: unittests
60+
name: codecov-umbrella
61+
62+
lint:
63+
runs-on: ubuntu-latest
64+
steps:
65+
- uses: actions/checkout@v4
66+
67+
- name: Set up Python
68+
uses: actions/setup-python@v5
69+
with:
70+
python-version: '3.12'
71+
72+
- name: Install uv
73+
uses: astral-sh/setup-uv@v5
74+
with:
75+
version: "0.5.14"
76+
77+
- name: Install dependencies
78+
run: |
79+
uv sync --all-extras --dev
80+
81+
- name: Run ruff check
82+
run: |
83+
uv run ruff check .
84+
85+
- name: Run ruff format check
86+
run: |
87+
uv run ruff format --check .
88+
89+
- name: Run mypy
90+
run: |
91+
uv run mypy helm_values_manager --ignore-missing-imports || true
92+
93+
plugin-test:
94+
runs-on: ubuntu-latest
95+
steps:
96+
- uses: actions/checkout@v4
97+
98+
- name: Install Helm
99+
uses: azure/setup-helm@v3
100+
with:
101+
version: 'v3.15.0'
102+
103+
- name: Test Helm plugin installation
104+
run: |
105+
helm plugin install .
106+
helm values-manager --version
107+
helm plugin uninstall values-manager

0 commit comments

Comments
 (0)