Skip to content

Commit ab13227

Browse files
Copilotsonnyt
andcommitted
Add GitHub Actions CI/CD workflow
Co-authored-by: sonnyt <183387+sonnyt@users.noreply.github.com>
1 parent 6c2c68a commit ab13227

1 file changed

Lines changed: 78 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -e .
28+
pip install -r requirements-dev.txt
29+
30+
- name: Run tests
31+
run: |
32+
python -m pytest tests/ -v --tb=short
33+
34+
- name: Check package can be imported
35+
run: |
36+
python -c "from bundleup import BundleUp; print('✓ Package imports successfully')"
37+
38+
lint:
39+
runs-on: ubuntu-latest
40+
41+
steps:
42+
- uses: actions/checkout@v4
43+
44+
- name: Set up Python
45+
uses: actions/setup-python@v5
46+
with:
47+
python-version: '3.12'
48+
49+
- name: Check Python syntax
50+
run: |
51+
python -m py_compile bundleup/*.py bundleup/unify/*.py tests/*.py
52+
53+
build:
54+
runs-on: ubuntu-latest
55+
needs: [test, lint]
56+
57+
steps:
58+
- uses: actions/checkout@v4
59+
60+
- name: Set up Python
61+
uses: actions/setup-python@v5
62+
with:
63+
python-version: '3.12'
64+
65+
- name: Install build dependencies
66+
run: |
67+
python -m pip install --upgrade pip
68+
pip install build
69+
70+
- name: Build package
71+
run: |
72+
python -m build
73+
74+
- name: Upload artifacts
75+
uses: actions/upload-artifact@v4
76+
with:
77+
name: dist
78+
path: dist/

0 commit comments

Comments
 (0)