Skip to content

Commit 1a3f276

Browse files
committed
add ci-cd.yamal
1 parent 50f539f commit 1a3f276

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed

.github/workflows/ci-cd.yaml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Python application
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
with:
19+
fetch-depth: 0
20+
- name: Set up Python 3.9.7
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: 3.9.7
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install flake8 pytest
28+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
29+
- name: Lint with flake8
30+
run: |
31+
# stop the build if there are Python syntax errors or undefined names
32+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
33+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
34+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
35+
- name: Test with pytest
36+
run: |
37+
pytest -v
38+
##- name: Deploy to Heroku
39+
## env:
40+
## HEROKU_API_TOKEN: ${{ secrets.HEROKU_API_TOKEN }}
41+
## HEROKU_APP_NAME: ${{ secrets.HEROKU_APP_NAME }}
42+
## if: github.ref == 'refs/heads/main' && job.status == 'success'
43+
## run: |
44+
## git remote add heroku https://heroku:$HEROKU_API_TOKEN@git.heroku.com/$HEROKU_APP_NAME.git
45+
## git push heroku HEAD:main -f

prediction_service/model/model.joblib

1.19 KB
Binary file not shown.

webapp/templates/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
placeholder="sulphates expected range 0.33 to 2.0"></textarea>
7373
<textarea class="form-control" name="alcohol" rows="1"
7474
placeholder="alcohol expected range 8.4 to 14.9"></textarea>
75+
7576

7677
</div>
7778

0 commit comments

Comments
 (0)