-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (40 loc) · 1.25 KB
/
ci_pipeline.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 Checks
on:
push:
branches: [ "master", "dev" ]
pull_request:
branches: [ "master", "dev" ]
release:
types: [created, published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install dependencies
run: |
poetry install
- name: Static type checking with mypy
run: |
# Run mypy for type checking
poetry run mypy .
- name: Lint with flake8
run: |
# Run flake8 to lint the code
poetry run flake8 src --max-line-length=79 --exclude='src/core/infrastructure/database/migrations/*'\
- name: Check formatting imports with isort
run: |
poetry run isort --check-only .
# - name: Test with unittest
# run: |
# # Run tests with Python's unittest module
# python -m unittest discover tests