-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.05 KB
/
github_ci.yml
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
45
46
47
48
49
50
51
name: CI pipeline
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
pipeline_name:
name: Pipeline
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.2.0
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Run Static Analysis
run: |
echo "Formatting code"
black src
black tests
echo "Linting code"
ruff src
ruff tests
echo "Running static analysis"
mypy src
mypy tests
- name: Run Script
run: |
python src/main.py
- name: Run Tests
run: |
echo "Running Tests"
pytest -v tests/ --junitxml=test-reports/tests_report.xml
- name: Generate Test Coverage Report
run: |
echo "Generating Test Coverage Report"
pytest --cov --cov-report=html:test-reports/coverage-report
- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: test-reports
path: test-reports/