From 5e108d7beadc6bcab3320142715f93a0a9fc0a8e Mon Sep 17 00:00:00 2001 From: Jaybeepy Date: Thu, 15 May 2025 15:30:00 +0100 Subject: [PATCH 1/2] Adding build workflow --- .github/workflows/python-app.yml | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/python-app.yml diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml new file mode 100644 index 0000000..9e301eb --- /dev/null +++ b/.github/workflows/python-app.yml @@ -0,0 +1,34 @@ +name: Python Flask CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + + - name: Lint with pylint + run: | + pylint --disable=C0111,C0103,C0303,C0330 **/*.py + + - name: Run tests + run: | + # Add test command here when tests are available + echo "No tests configured yet" \ No newline at end of file From 7773a79917d5581fe9ea26edbdcf5ce085fbdeb5 Mon Sep 17 00:00:00 2001 From: Jaybeepy Date: Thu, 15 May 2025 15:37:25 +0100 Subject: [PATCH 2/2] Adding build workflow --- .vscode/settings.json | 4 ++++ __pycache__/app.cpython-39.pyc | Bin 0 -> 320 bytes __pycache__/readme.md | 1 + app.py | 8 ++++++++ requirements.txt | 15 +++++++++++++++ 5 files changed, 28 insertions(+) create mode 100644 .vscode/settings.json create mode 100644 __pycache__/app.cpython-39.pyc create mode 100644 __pycache__/readme.md create mode 100644 app.py create mode 100644 requirements.txt diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..cc67606 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "python.linting.pylintEnabled": true, + "python.linting.enabled": true +} \ No newline at end of file diff --git a/__pycache__/app.cpython-39.pyc b/__pycache__/app.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..855e8c3b98b1cd8bba07f8d4d23f5072a212d3dd GIT binary patch literal 320 zcmYjL!Ab)$5X~f;Whw4I*yD=my%Z4&;;9JU%0gJ0kWAoI5B^fFp8SQL zoY@}QfqBWBy!R$eS&jr%-}k1Y^OwnaDI)jO@ru9-3r@7K01yZ$KVYFyePvdDgH<;B z6g1IRKZ`2=BfY2~=?B-u%>izgJUA~PGNXu$QYl&yS=nu8^QkRd0WS9#KdEbufH#%!AwjY*1ZNe92* b;h;P%JKi`c71P$+y~8{HbmYJbC{zLe%@RS6 literal 0 HcmV?d00001 diff --git a/__pycache__/readme.md b/__pycache__/readme.md new file mode 100644 index 0000000..c98925b --- /dev/null +++ b/__pycache__/readme.md @@ -0,0 +1 @@ +Just a random readme file okay. diff --git a/app.py b/app.py new file mode 100644 index 0000000..cd64e99 --- /dev/null +++ b/app.py @@ -0,0 +1,8 @@ +from flask import Flask +app = Flask(__name__) + + +@app.route("/") +def home(): + return "Hello, this is a sample Python Web App running on Flask Framework!" + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..b62bff8 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,15 @@ +astroid==2.4.2 +click==7.1.2 +colorama==0.4.4 +Flask==1.1.2 +isort==5.6.4 +itsdangerous==1.1.0 +Jinja2==2.11.2 +lazy-object-proxy==1.4.3 +MarkupSafe==1.1.1 +mccabe==0.6.1 +pylint==2.6.0 +six==1.15.0 +toml==0.10.2 +Werkzeug==1.0.1 +wrapt==1.12.1