|
1 | | -name: CI |
2 | | - |
3 | | -on: |
4 | | - push: |
5 | | - branches: [ main, develop ] |
6 | | - pull_request: |
7 | | - branches: [ main, develop ] |
8 | | - |
9 | | -jobs: |
10 | | - lint: |
11 | | - name: Lint |
12 | | - runs-on: ubuntu-latest |
13 | | - strategy: |
14 | | - matrix: |
15 | | - python-version: ["3.10", "3.11", "3.12"] |
16 | | - |
17 | | - steps: |
18 | | - - name: Checkout code |
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 dependencies |
27 | | - run: | |
28 | | - python -m pip install --upgrade pip |
29 | | - pip install black flake8 mypy |
30 | | -
|
31 | | - - name: Check code formatting with black |
32 | | - run: black --check . |
33 | | - |
34 | | - - name: Lint with flake8 |
35 | | - run: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics |
36 | | - continue-on-error: true |
37 | | - |
38 | | - - name: Type check with mypy |
39 | | - run: mypy . --ignore-missing-imports |
40 | | - continue-on-error: true |
41 | | - |
42 | | - test: |
43 | | - name: Test |
44 | | - runs-on: ${{ matrix.os }} |
45 | | - strategy: |
46 | | - fail-fast: false |
47 | | - matrix: |
48 | | - os: [ubuntu-latest, windows-latest, macos-latest] |
49 | | - python-version: ["3.10", "3.11", "3.12"] |
50 | | - |
51 | | - steps: |
52 | | - - name: Checkout code |
53 | | - uses: actions/checkout@v4 |
54 | | - |
55 | | - - name: Set up Python ${{ matrix.python-version }} |
56 | | - uses: actions/setup-python@v5 |
57 | | - with: |
58 | | - python-version: ${{ matrix.python-version }} |
59 | | - |
60 | | - - name: Install system dependencies (Ubuntu) |
61 | | - if: matrix.os == 'ubuntu-latest' |
62 | | - run: | |
63 | | - sudo apt-get update |
64 | | - sudo apt-get install -y python3-pyqt6 python3-pyqt6.qtcharts |
65 | | -
|
66 | | - # PyQt6 is installed via pip from requirements.txt, no system package needed |
67 | | - |
68 | | - - name: Install dependencies |
69 | | - run: | |
70 | | - python -m pip install --upgrade pip |
71 | | - pip install -r requirements.txt |
72 | | -
|
73 | | - - name: Install package in development mode |
74 | | - run: pip install -e . |
75 | | - |
76 | | - - name: Run tests with pytest |
77 | | - run: pytest -v || echo "No tests found, skipping" |
78 | | - continue-on-error: true |
79 | | - |
80 | | - - name: Verify application can be imported |
81 | | - run: python -c "import db_storage_manager; print('Import successful')" |
82 | | - |
83 | | - build: |
84 | | - name: Build |
85 | | - runs-on: ${{ matrix.os }} |
86 | | - needs: [lint, test] |
87 | | - strategy: |
88 | | - matrix: |
89 | | - os: [ubuntu-latest, windows-latest, macos-latest] |
90 | | - python-version: ["3.12"] |
91 | | - |
92 | | - steps: |
93 | | - - name: Checkout code |
94 | | - uses: actions/checkout@v4 |
95 | | - |
96 | | - - name: Set up Python ${{ matrix.python-version }} |
97 | | - uses: actions/setup-python@v5 |
98 | | - with: |
99 | | - python-version: ${{ matrix.python-version }} |
100 | | - |
101 | | - - name: Install system dependencies (Ubuntu) |
102 | | - if: matrix.os == 'ubuntu-latest' |
103 | | - run: | |
104 | | - sudo apt-get update |
105 | | - sudo apt-get install -y python3-pyqt6 python3-pyqt6.qtcharts |
106 | | -
|
107 | | - # PyQt6 is installed via pip from requirements.txt, no system package needed |
108 | | - |
109 | | - - name: Install dependencies |
110 | | - run: | |
111 | | - python -m pip install --upgrade pip |
112 | | - pip install -r requirements.txt |
113 | | - pip install build |
114 | | -
|
115 | | - - name: Build package |
116 | | - run: python -m build |
117 | | - |
118 | | - - name: Upload build artifacts |
119 | | - uses: actions/upload-artifact@v4 |
120 | | - with: |
121 | | - name: dist-${{ matrix.os }} |
122 | | - path: dist/ |
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ main, develop ] |
| 6 | + pull_request: |
| 7 | + branches: [ main, develop ] |
| 8 | + |
| 9 | +jobs: |
| 10 | + lint: |
| 11 | + name: Lint |
| 12 | + runs-on: ubuntu-latest |
| 13 | + strategy: |
| 14 | + matrix: |
| 15 | + python-version: ["3.10", "3.11", "3.12"] |
| 16 | + |
| 17 | + steps: |
| 18 | + - name: Checkout code |
| 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 dependencies |
| 27 | + run: | |
| 28 | + python -m pip install --upgrade pip |
| 29 | + pip install black flake8 mypy |
| 30 | +
|
| 31 | + - name: Check code formatting with black |
| 32 | + run: black --check . |
| 33 | + |
| 34 | + - name: Lint with flake8 |
| 35 | + run: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics |
| 36 | + continue-on-error: true |
| 37 | + |
| 38 | + - name: Type check with mypy |
| 39 | + run: mypy . --ignore-missing-imports |
| 40 | + continue-on-error: true |
| 41 | + |
| 42 | + test: |
| 43 | + name: Test |
| 44 | + runs-on: ${{ matrix.os }} |
| 45 | + strategy: |
| 46 | + fail-fast: false |
| 47 | + matrix: |
| 48 | + os: [ubuntu-latest, windows-latest, macos-latest] |
| 49 | + python-version: ["3.10", "3.11", "3.12"] |
| 50 | + |
| 51 | + steps: |
| 52 | + - name: Checkout code |
| 53 | + uses: actions/checkout@v4 |
| 54 | + |
| 55 | + - name: Set up Python ${{ matrix.python-version }} |
| 56 | + uses: actions/setup-python@v5 |
| 57 | + with: |
| 58 | + python-version: ${{ matrix.python-version }} |
| 59 | + |
| 60 | + - name: Install system dependencies (Ubuntu) |
| 61 | + if: matrix.os == 'ubuntu-latest' |
| 62 | + run: | |
| 63 | + sudo apt-get update |
| 64 | + sudo apt-get install -y python3-pyqt6 python3-pyqt6.qtcharts |
| 65 | +
|
| 66 | + # PyQt6 is installed via pip from requirements.txt, no system package needed |
| 67 | + |
| 68 | + - name: Install dependencies |
| 69 | + run: | |
| 70 | + python -m pip install --upgrade pip |
| 71 | + pip install -r requirements.txt |
| 72 | +
|
| 73 | + - name: Install package in development mode |
| 74 | + run: pip install -e . |
| 75 | + |
| 76 | + - name: Run tests with pytest |
| 77 | + run: pytest -v || echo "No tests found, skipping" |
| 78 | + continue-on-error: true |
| 79 | + |
| 80 | + - name: Verify application can be imported |
| 81 | + run: python -c "import db_storage_manager; print('Import successful')" |
| 82 | + |
| 83 | + build: |
| 84 | + name: Build |
| 85 | + runs-on: ${{ matrix.os }} |
| 86 | + needs: [lint, test] |
| 87 | + strategy: |
| 88 | + matrix: |
| 89 | + os: [ubuntu-latest, windows-latest, macos-latest] |
| 90 | + python-version: ["3.12"] |
| 91 | + |
| 92 | + steps: |
| 93 | + - name: Checkout code |
| 94 | + uses: actions/checkout@v4 |
| 95 | + |
| 96 | + - name: Set up Python ${{ matrix.python-version }} |
| 97 | + uses: actions/setup-python@v5 |
| 98 | + with: |
| 99 | + python-version: ${{ matrix.python-version }} |
| 100 | + |
| 101 | + - name: Install system dependencies (Ubuntu) |
| 102 | + if: matrix.os == 'ubuntu-latest' |
| 103 | + run: | |
| 104 | + sudo apt-get update |
| 105 | + sudo apt-get install -y python3-pyqt6 python3-pyqt6.qtcharts |
| 106 | +
|
| 107 | + # PyQt6 is installed via pip from requirements.txt, no system package needed |
| 108 | + |
| 109 | + - name: Install dependencies |
| 110 | + run: | |
| 111 | + python -m pip install --upgrade pip |
| 112 | + pip install -r requirements.txt |
| 113 | + pip install build |
| 114 | +
|
| 115 | + - name: Build package |
| 116 | + run: python -m build |
| 117 | + |
| 118 | + - name: Upload build artifacts |
| 119 | + uses: actions/upload-artifact@v4 |
| 120 | + with: |
| 121 | + name: dist-${{ matrix.os }} |
| 122 | + path: dist/ |
0 commit comments