Skip to content

Commit

Permalink
created new workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
githubabby committed Sep 4, 2024
1 parent 8ffd9cf commit 364a9ed
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
pip install pylint flask
- name: Analysing the code with pylint
run: |
pylint $(git ls-files '*.py')
20 changes: 20 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: test project
on:
push:
branches:
- 'dev'
jobs:
test:
run-on: ubuntu-latest
steps:
- name: get code
uses: actions/checkout@v4
- name: set up python 3.10
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: install required modules
run: pip install flask pylint pytest
- name: run test
run: pytest

6 changes: 5 additions & 1 deletion essentials/app.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
'''
This is a basic flask application.
'''
from flask import Flask

app = Flask(__name__)

@app.route("/")
def hello_world():
return "<p>Hello, World!</p>"
'''Returns hello World!'''
return "<p>Hello, World!</p>"
6 changes: 5 additions & 1 deletion tests/test_basic.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
'''
This is a test file.
'''
def test_always_pass():
assert True
'''This test always pass'''
assert True

0 comments on commit 364a9ed

Please sign in to comment.