-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (35 loc) · 1.15 KB
/
Copy pathmain.yml
File metadata and controls
44 lines (35 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: CI/CD Workflow
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.12']
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install uv and set the Python version
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
- name: Install the project
run: uv sync --locked --dev
- name: Lint code, no auto-fixing, clear failure messages
run: uv run ruff check .
# NOTE: Formatting should be handled manually and should not break the CI/CD pipeline. This ensures that formatting issues are addressed in a controlled manner.
- name: Run tests
run: uv run pytest -v
- name: Upload coverage to Codecov
if: ${{ !env.ACT }}
uses: codecov/codecov-action@v6
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Auto-apply labels
uses: actions/labeler@v5
# NOTE: requires a .github/labeler.yml file with appropriate rules