|
12 | 12 | runs-on: ubuntu-latest |
13 | 13 | strategy: |
14 | 14 | matrix: |
15 | | - python-version: ["3.10", "3.11", "3.12"] |
| 15 | + python-version: ["3.10", "3.11", "3.12", "3.13"] |
16 | 16 |
|
17 | 17 | steps: |
18 | 18 | - name: Checkout Code |
|
32 | 32 | - name: Run Ruff Linter |
33 | 33 | run: ruff check . |
34 | 34 |
|
| 35 | + - name: Run Ruff Format Check |
| 36 | + run: ruff format --check . |
| 37 | + |
35 | 38 | - name: Run Mypy Type Checker |
36 | | - run: mypy src |
| 39 | + run: | |
| 40 | + cd src |
| 41 | + mypy wintersolve |
| 42 | +
|
| 43 | + - name: Run Tests with Coverage |
| 44 | + run: pytest --cov=wintersolve --cov-report=xml |
| 45 | + |
| 46 | + - name: Upload Coverage |
| 47 | + uses: codecov/codecov-action@v4 |
| 48 | + with: |
| 49 | + files: ./coverage.xml |
| 50 | + fail_ci_if_error: false |
| 51 | + |
| 52 | + security: |
| 53 | + name: Security Scan |
| 54 | + runs-on: ubuntu-latest |
| 55 | + steps: |
| 56 | + - name: Checkout Code |
| 57 | + uses: actions/checkout@v4 |
| 58 | + |
| 59 | + - name: Set up Python |
| 60 | + uses: actions/setup-python@v5 |
| 61 | + with: |
| 62 | + python-version: "3.12" |
| 63 | + cache: "pip" |
| 64 | + |
| 65 | + - name: Install Dependencies |
| 66 | + run: | |
| 67 | + python -m pip install --upgrade pip |
| 68 | + pip install -e .[security] |
37 | 69 |
|
38 | | - - name: Run Tests |
39 | | - run: pytest |
| 70 | + - name: Run Bandit Security Scan |
| 71 | + run: bandit -r src/wintersolve -f json -o bandit-report.json || true |
| 72 | + |
| 73 | + - name: Upload Bandit Report |
| 74 | + uses: actions/upload-artifact@v4 |
| 75 | + with: |
| 76 | + name: bandit-report |
| 77 | + path: bandit-report.json |
| 78 | + |
| 79 | + build: |
| 80 | + name: Build Package |
| 81 | + runs-on: ubuntu-latest |
| 82 | + steps: |
| 83 | + - name: Checkout Code |
| 84 | + uses: actions/checkout@v4 |
| 85 | + |
| 86 | + - name: Set up Python |
| 87 | + uses: actions/setup-python@v5 |
| 88 | + with: |
| 89 | + python-version: "3.12" |
| 90 | + |
| 91 | + - name: Install Build Dependencies |
| 92 | + run: | |
| 93 | + python -m pip install --upgrade pip |
| 94 | + pip install build twine |
| 95 | +
|
| 96 | + - name: Build Package |
| 97 | + run: python -m build |
| 98 | + |
| 99 | + - name: Check Distribution |
| 100 | + run: python -m twine check dist/* |
| 101 | + |
| 102 | + - name: Upload Distribution Artifacts |
| 103 | + uses: actions/upload-artifact@v4 |
| 104 | + with: |
| 105 | + name: dist |
| 106 | + path: dist/ |
0 commit comments