File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : CI/CD
1+ name : CI Pipeline
22
33on :
44 push :
5- branches :
6- - main
5+ branches : [main]
76 pull_request :
8- branches :
9- - main
7+ branches : [main]
108
119jobs :
12- build-and-test :
10+ ci :
11+ name : Continuous Integration
1312 runs-on : ubuntu-latest
13+ strategy :
14+ matrix :
15+ python-version : [3.12]
1416
1517 steps :
1618 - name : Checkout repository
@@ -19,25 +21,30 @@ jobs:
1921 - name : Set up Python
2022 uses : actions/setup-python@v4
2123 with :
22- python-version : ' 3.12 '
24+ python-version : ${{ matrix.python-version }}
2325
2426 - name : Install dependencies
2527 run : |
2628 python -m pip install --upgrade pip
2729 pip install -r requirements.txt
2830 pip install -r requirements-dev.txt
2931
30- - name : Run Pre-commit
31- uses : pre-commit/action@v3.3.4
32+ - name : Run Pre-commit checks
33+ uses : pre-commit/action@v3.0.0
3234 with :
3335 extra_args : --all-files
3436
35- - name : Run tests
36- run : |
37- pytest -v --tb=short
38-
3937 - name : Run type checking
4038 run : mypy src/
4139
4240 - name : Run linter
4341 run : ruff check src/
42+
43+ - name : Run tests
44+ run : pytest -v --tb=short --cov=src --cov-report=xml
45+
46+ - name : Upload coverage to Codecov
47+ uses : codecov/codecov-action@v4
48+ with :
49+ files : ./coverage.xml
50+ fail_ci_if_error : true
You can’t perform that action at this time.
0 commit comments