File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI workflow
2+
3+ on :
4+ push :
5+ branches : ["main"]
6+ pull_request :
7+ branches : ["main"]
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+ container : python:3.9-slim
13+
14+ steps :
15+ # Step 1: Checkout the repository
16+ - name : Checkout
17+ uses : actions/checkout@v3
18+
19+ # Step 2: Install dependencies
20+ - name : Install dependencies
21+ run : |
22+ python -m pip install --upgrade pip
23+ pip install -r requirements.txt
24+ pip install flake8
25+ pip install nose
26+
27+ # Step 3: Lint the code with flake8
28+ - name : Lint with flake8
29+ run : |
30+ flake8 ci_cd_final_project/service --count --select=E9,F63,F7,F82 --show-source --statistics
31+ flake8 ci_cd_final_project/service --count --max-complexity=10 --max-line-length=127 --statistics
32+ flake8 ci_cd_final_project/tests --count --select=E9,F63,F7,F82 --show-source --statistics
33+ flake8 ci_cd_final_project/tests --count --max-complexity=10 --max-line-length=127 --statistics
34+
35+ # Step 4: Run unit tests with nose
36+ - name : Run unit tests with nose
37+ run : |
38+ nosetests -v --with-spec --spec-color --with-coverage --cover-package=ci_cd_final_project/service
You can’t perform that action at this time.
0 commit comments