1+ # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
2+ name : Pull Request
3+
4+ on :
5+ pull_request :
6+ branches :
7+ - main
8+ push :
9+ branches :
10+ - main
11+
12+ jobs :
13+ lint_code :
14+ runs-on : ubuntu-latest
15+ strategy :
16+ matrix :
17+ python-version : ["3.11"]
18+ steps :
19+ - uses : actions/checkout@v3
20+ - name : Set up Python ${{ matrix.python-version }}
21+ uses : actions/setup-python@v3
22+ with :
23+ python-version : ${{ matrix.python-version }}
24+ - name : Install dependencies
25+ run : |
26+ python -m pip install --upgrade pip
27+ pip install .[dev]
28+ - name : Analysing the code with pre-commit lint checks
29+ run : |
30+ pre-commit run -a
31+
32+ test_code_python3p8 :
33+ runs-on : ubuntu-latest
34+ strategy :
35+ matrix :
36+ python-version : ["3.8"]
37+ steps :
38+ - uses : actions/checkout@v4
39+ - name : Set up Python ${{ matrix.python-version }}
40+ uses : actions/setup-python@v3
41+ with :
42+ python-version : ${{ matrix.python-version }}
43+ - name : Install dependencies
44+ run : |
45+ python -m pip install --upgrade pip
46+ pip install .[dev]
47+ - name : Test code
48+ run : |
49+ mkdir test_report
50+ tox
51+
52+
53+ test_code_and_coverage_report_python3p11 :
54+ runs-on : ubuntu-latest
55+ strategy :
56+ matrix :
57+ python-version : ["3.11"]
58+ steps :
59+ - uses : actions/checkout@v4
60+ - name : Set up Python ${{ matrix.python-version }}
61+ uses : actions/setup-python@v3
62+ with :
63+ python-version : ${{ matrix.python-version }}
64+ - name : Install dependencies
65+ run : |
66+ python -m pip install --upgrade pip
67+ pip install .[dev]
68+ - name : Test code
69+ run : |
70+ mkdir test_report
71+ tox
72+ - name : html to pdf
73+ uses : fifsky/html-to-pdf-action@master
74+ with :
75+ htmlFile : test_report/cov_report/index.html
76+ outputFile : test_report/cov_report/cov_report.pdf
77+ pdfOptions : ' {"format": "A4", "margin": {"top": "10mm", "left": "10mm", "right": "10mm", "bottom": "10mm"}}'
78+ - name : Archive code coverage results
79+ uses : actions/upload-artifact@v4
80+ with :
81+ name : code-coverage-report
82+ path : test_report/cov_report/cov_report.pdf
0 commit comments