-
Notifications
You must be signed in to change notification settings - Fork 20
58 lines (44 loc) · 1.66 KB
/
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
52
53
54
55
56
57
# Basic workflow for building and testing the pip installation
name: Continuous Integration
on:
pull_request:
branches: [ main, develop ]
types: [opened, synchronize, reopened, edited]
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
jobs:
Code_Quality_Check:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', 3.11]
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Setup Poetry
uses: abatilo/actions-poetry@v2.1.0
with:
poetry-version: 1.5.1
- name: Configure Poetry Settings
shell: bash
run: python -m poetry config virtualenvs.in-project true
- name: Verify Poetry Version
run: poetry --version
- name: Install Project Dependencies
run: python -m poetry install
- name: Lint Codebase with flake8
run: |
python -m poetry run flake8 . --exclude .venv --count --select=E9,F63,F7,F82 --show-source --statistics
python -m poetry run flake8 . --exclude .venv --count --exit-zero --max-complexity=10 --max-line-length=79 --statistics
- name: Execute Tests with pytest and Coverage
run: |
python -m poetry run coverage run -m pytest
python -m poetry run coverage report -m
python -m poetry run coverage xml
- name: Upload Coverage Report to Codecov
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml