Skip to content

Commit 9c8da5e

Browse files
committed
updated CI
1 parent d6008c7 commit 9c8da5e

File tree

7 files changed

+19
-1559
lines changed

7 files changed

+19
-1559
lines changed

.github/workflows/CI.yml

Lines changed: 19 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ on:
88
workflow_dispatch:
99

1010
jobs:
11-
# Run tests on Ubuntu only
12-
test:
13-
name: Run Tests on Ubuntu - Python ${{ matrix.python-version }}
14-
runs-on: ubuntu-latest
11+
# Build and installation verification
12+
build:
13+
name: Build & Install on ${{ matrix.os }} - Python ${{ matrix.python-version }}
14+
runs-on: ${{ matrix.os }}
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
python-version: ["3.10", "3.11", "3.12"]
18+
os: [ubuntu-latest, macos-latest, windows-latest]
19+
python-version: ["3.10", "3.11"]
1920

2021
steps:
2122
- name: Checkout repository
@@ -32,59 +33,6 @@ jobs:
3233
- name: Display Python version
3334
run: python --version
3435

35-
- name: Install dependencies
36-
run: |
37-
python -m pip install --upgrade pip
38-
pip install pytest pytest-cov pytest-mock python-box click rich requests packaging
39-
40-
- name: Install package in development mode
41-
run: |
42-
pip install -e .
43-
44-
- name: Run tests with pytest
45-
run: |
46-
pytest tests/ -v --tb=short --color=yes
47-
48-
- name: Run tests with coverage (Python 3.11 only)
49-
if: matrix.python-version == '3.11'
50-
run: |
51-
pytest tests/ --cov=geeup --cov-report=xml --cov-report=term
52-
53-
- name: Upload coverage to Codecov (Python 3.11 only)
54-
if: matrix.python-version == '3.11'
55-
uses: codecov/codecov-action@v4
56-
with:
57-
file: ./coverage.xml
58-
flags: unittests
59-
name: codecov-umbrella
60-
fail_ci_if_error: false
61-
62-
- name: Test summary
63-
run: |
64-
echo "Tests passed on Ubuntu with Python ${{ matrix.python-version }}"
65-
66-
# Build and installation verification
67-
build:
68-
name: Build & Install on Ubuntu - Python ${{ matrix.python-version }}
69-
runs-on: ubuntu-latest
70-
needs: test # Only run after tests pass
71-
strategy:
72-
fail-fast: false
73-
matrix:
74-
python-version: ["3.10", "3.11", "3.12"]
75-
76-
steps:
77-
- name: Checkout repository
78-
uses: actions/checkout@v4
79-
with:
80-
fetch-depth: 0
81-
82-
- name: Set up Python ${{ matrix.python-version }}
83-
uses: actions/setup-python@v5
84-
with:
85-
python-version: ${{ matrix.python-version }}
86-
cache: "pip"
87-
8836
- name: Install build dependencies
8937
run: |
9038
python -m pip install --upgrade pip
@@ -94,13 +42,23 @@ jobs:
9442
run: |
9543
python -m build
9644
97-
- name: Install package
45+
- name: Install package (Unix)
46+
if: matrix.os != 'windows-latest'
9847
run: |
9948
for file in dist/*.whl; do
10049
echo "Installing $file..."
10150
pip install "$file"
10251
done
10352
53+
- name: Install package (Windows)
54+
if: matrix.os == 'windows-latest'
55+
shell: pwsh
56+
run: |
57+
Get-ChildItem -Path dist -Filter *.whl | ForEach-Object {
58+
Write-Host "Installing $_..."
59+
pip install $_.FullName
60+
}
61+
10462
- name: Verify geeup installation
10563
run: |
10664
geeup --help
@@ -115,12 +73,12 @@ jobs:
11573
11674
- name: Installation summary
11775
run: |
118-
echo "Build and installation successful on Ubuntu with Python ${{ matrix.python-version }}"
76+
echo "Build and installation successful on ${{ matrix.os }} with Python ${{ matrix.python-version }}"
11977
echo "All help commands working correctly"
12078
12179
- name: Upload wheel artifacts
12280
uses: actions/upload-artifact@v4
123-
if: matrix.python-version == '3.11'
81+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
12482
with:
12583
name: wheels
12684
path: dist/*.whl

pytest.ini

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

tests/__init__.py

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

tests/conftest.py

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

0 commit comments

Comments
 (0)