/ .github / workflows / ci.yml
ci.yml
 1  name: CI
 2  
 3  on:
 4    push:
 5      branches: [main]
 6    pull_request:
 7      branches: [main]
 8  
 9  permissions:
10    contents: read
11  
12  jobs:
13    lint:
14      runs-on: ubuntu-latest
15      steps:
16        - uses: actions/checkout@v6
17        - uses: actions/setup-python@v6
18          with:
19            python-version: "3.12"
20            cache: 'pip'
21        - name: Install dependencies
22          run: pip install -e ".[dev]"
23        - name: Ruff check
24          run: ruff check mureo/
25        - name: Black check
26          run: black --check mureo/
27        - name: Type check
28          run: mypy mureo/ --ignore-missing-imports
29  
30    test:
31      needs: lint
32      runs-on: ubuntu-latest
33      strategy:
34        matrix:
35          python-version: ["3.10", "3.11", "3.12"]
36      steps:
37        - uses: actions/checkout@v6
38        - uses: actions/setup-python@v6
39          with:
40            python-version: ${{ matrix.python-version }}
41            cache: 'pip'
42        - name: Install dependencies
43          run: pip install -e ".[dev,cli,mcp]"
44        - name: Run tests
45          run: pytest tests/ --cov=mureo --cov-report=xml --cov-report=term-missing --cov-fail-under=80 -v
46        - name: Upload coverage
47          if: matrix.python-version == '3.12'
48          uses: codecov/codecov-action@v6
49          with:
50            files: coverage.xml
51            token: ${{ secrets.CODECOV_TOKEN }}
52            fail_ci_if_error: false