forked from iam-veeramalla/ultimate-devops-project-demo
-
Notifications
You must be signed in to change notification settings - Fork 10
53 lines (45 loc) · 1.32 KB
/
recommendation.yaml
File metadata and controls
53 lines (45 loc) · 1.32 KB
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
name: recommendation-service-ci
on:
pull_request:
branches: [main]
push:
paths:
- '.github/workflows/recommendation.yaml'
- 'src/recommendation/**'
jobs:
unit-testing:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
run: |
cd src/recommendation
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run unit tests
working-directory: ./src/recommendation
run: |
python3 -m unittest discover -s . -p "test_recommendation_service.py"
code-quality:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
run: |
cd src/recommendation
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run flake8 (code quality check)
working-directory: ./src/recommendation
run: |
flake8 . --max-line-length=100 --exclude=demo_pb2.py,demo_pb2_grpc.py,venv