From fea8f1b2ffc99fa76857a56cbb91421ca2d8d1d3 Mon Sep 17 00:00:00 2001 From: vj-m Date: Tue, 18 Apr 2023 23:53:11 -0400 Subject: [PATCH 01/14] induce a failed test --- .github/workflows/ci_cd_wf.yml | 3 --- calculator.py | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/ci_cd_wf.yml b/.github/workflows/ci_cd_wf.yml index 9e95f402..184b9b32 100644 --- a/.github/workflows/ci_cd_wf.yml +++ b/.github/workflows/ci_cd_wf.yml @@ -4,9 +4,6 @@ on: push: branches: - main - pull_request_target: - branches: - - main jobs: test: diff --git a/calculator.py b/calculator.py index fbcead9c..9a3d2746 100644 --- a/calculator.py +++ b/calculator.py @@ -16,7 +16,7 @@ def div(a,b): return (a/b) def test_add(): - assert add(1,1) == 2 + assert add(1,1) == 0 def test_sub(): assert sub(1,1) == 0 From c9befb9c6af5be8396d6c511d4f533e28ccd6d29 Mon Sep 17 00:00:00 2001 From: vj-m Date: Wed, 19 Apr 2023 00:00:02 -0400 Subject: [PATCH 02/14] clean final code --- calculator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calculator.py b/calculator.py index 9a3d2746..fbcead9c 100644 --- a/calculator.py +++ b/calculator.py @@ -16,7 +16,7 @@ def div(a,b): return (a/b) def test_add(): - assert add(1,1) == 0 + assert add(1,1) == 2 def test_sub(): assert sub(1,1) == 0 From 09838f6876bf05dacc047a630150bed28a18d051 Mon Sep 17 00:00:00 2001 From: VeeJ <108243657+vj-m@users.noreply.github.com> Date: Mon, 8 May 2023 15:42:58 -0400 Subject: [PATCH 03/14] Update README.md --- README.md | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 91 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 174488da..740a9995 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,91 @@ -# week1-devops -All Code and Files for Intro to DevOps Week 1 Project +# Week 1 - Project + +# Goal +To Establish a Robust and Reliable Development process by settting version control using Git, implementing comprehensive Unit Tests, and setting up effective workflows to ensure that only properly tested code is merged from other branches into the Master branch. + +## Requirements + +
Link to setup Python 3.9 - https://www.python.org/downloads/
+
Link to setup Git the first time - https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup
+
Use a Editor of your choice
+
Link to get pip3 - https://pip.pypa.io/en/stable/installation/
+ +## Step 1 - Get the inital start code onto your system + +Git clone initial code from this Github Repo - https://github.com/vj-m/week1-devops/tree/initial_starter_code +``` +git clone git@github.com:vj-m/week1-devops.git +``` +## Step 2 - Add Unit Tests + +``` +def test_add(): + assert add(1,1) == 2 + +def test_sub(): + assert sub(1,1) == 0 + +def test_mul(): + assert mul(1,1) == 1 + +def test_div(): + assert div(2,1) == 2 +``` + +## Step 3 - Create a workflow + +1.) Create a directory called .github/workflows within the directory containing .git +2.) And create a workflow ‘YAML’ file, let's call it ci_cd_wf.yml +3.) Git add and push changes (This automatically invokes the Git actions and sets up the CI/CD Pipeline which on push to the master branch) + +``` +name : test + +on: + push: + branches: + - main + +jobs: + test: + runs-on : ubuntu-latest + + steps: + - name: Check out repo code + uses: actions/checkout@v3 + + - name: Setup Python + uses: actions/setup-python@v3 + with: + python-version: "3.x" + + - name: Install Dependencies + run: | + python -m pip install -r requirements.txt + - name: Run tests + run: | + python -m pytest calculator.py +``` + +## Step 4 - Check our Gitflow with a new branch +
1.) Create a new feature branch to check a case where the push to master or PR fails by making a purposeful mistake in the code to fail a test
+
2.) Create a new feature branch called test
+ +``` +def test_add(): + assert add(1,1) == 0 +``` +
We have changed the test_add method to assert a False
+
3.) Git add, push and commit
+ +## Step 5 - Fix all the errors to make a successful build +
1.) Change back the test_add function
+
2.) Add, commit, and push the new changes to the master branch again
+ +### As the first week of the project comes to a close, it's important to reflect on the progress made so far. + +## Future Scope Recommendations - +
Now that the initial code is in place, it's time to focus on improving its quality. One way to do this is to add more checks such as linters, code coverage, and code quality checks.
+
Another recommended step is to add 'runs on' actions like a pull request. This allows for a more streamlined workflow and can help ensure that the code changes are thoroughly tested before being merged into the main branch.
+ +### As you move forward into Week 2 of the project, keep these next steps in mind. By continually improving the quality of your code, you'll be setting yourself up for success in the long run. From ae3141c7ca07b335307560a252f5f9d128764ff0 Mon Sep 17 00:00:00 2001 From: VeeJ <108243657+vj-m@users.noreply.github.com> Date: Mon, 8 May 2023 16:01:00 -0400 Subject: [PATCH 04/14] Update README.md (#5) --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 740a9995..b6f5799d 100644 --- a/README.md +++ b/README.md @@ -89,3 +89,10 @@ def test_add():
Another recommended step is to add 'runs on' actions like a pull request. This allows for a more streamlined workflow and can help ensure that the code changes are thoroughly tested before being merged into the main branch.
### As you move forward into Week 2 of the project, keep these next steps in mind. By continually improving the quality of your code, you'll be setting yourself up for success in the long run. + +## Appendix +
This repository has three branches - +### 'main' branch contains the file code for the project +### 'initial_starter_code' contains the inital code to start with +### 'test' - The state of the project with a wrong test added for reference - this is supposed to fail the merge to master process in our workflow +
From 59e6f8ab0b447ac98e6d4269a06c5bce93e7c052 Mon Sep 17 00:00:00 2001 From: Yudhiesh Ravindranath Date: Mon, 29 May 2023 01:46:21 +0800 Subject: [PATCH 05/14] Update base repository (#7) --- .github/workflows/ci_cd_wf.yml | 6 +-- .gitignore | 88 ++++++++++++++++++++++++++++++++++ calculator.py | 32 +++++-------- tests/test_calculator.py | 17 +++++++ 4 files changed, 120 insertions(+), 23 deletions(-) create mode 100644 .gitignore create mode 100644 tests/test_calculator.py diff --git a/.github/workflows/ci_cd_wf.yml b/.github/workflows/ci_cd_wf.yml index 184b9b32..aada2bac 100644 --- a/.github/workflows/ci_cd_wf.yml +++ b/.github/workflows/ci_cd_wf.yml @@ -1,4 +1,4 @@ -name : test +name: test on: push: @@ -7,7 +7,7 @@ on: jobs: test: - runs-on : ubuntu-latest + runs-on: ubuntu-latest steps: - name: Check out repo code @@ -23,4 +23,4 @@ jobs: python -m pip install -r requirements.txt - name: Run tests run: | - python -m pytest calculator.py \ No newline at end of file + python -m pytest tests diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..f092b1b4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,88 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# DotEnv configuration +.env + +# Database +*.db +*.rdb + +# Pycharm +.idea + +# VS Code +.vscode/ + +# Spyder +.spyproject/ + +# Jupyter NB Checkpoints +.ipynb_checkpoints/ + + +# Mac OS-specific storage files +.DS_Store + +# vim +*.swp +*.swo + +# Mypy cache +.mypy_cache/ + diff --git a/calculator.py b/calculator.py index fbcead9c..feefb4e3 100644 --- a/calculator.py +++ b/calculator.py @@ -1,37 +1,29 @@ # Demo Calculator App For Week 1 Project # Addition Method def add(a, b): - return (a + b) + return a + b + # Subtract Method def sub(a, b): - return (a - b) + return a - b + # Multiplication def mul(a, b): - return (a * b) - -# Division -def div(a,b): - return (a/b) - -def test_add(): - assert add(1,1) == 2 + return a * b -def test_sub(): - assert sub(1,1) == 0 -def test_mul(): - assert mul(1,1) == 1 +# Division +def div(a, b): + return a / b -def test_div(): - assert div(2,1) == 2 if __name__ == "__main__": # Declare variable and set default values a = 4 b = 2 - print('Sum of ' + str(a) + ' and ' + str(b) + ' is ', add(a, b)) - print('Difference of ' + str(a) + ' and ' + str(b) + ' is ', sub(a, b)) - print('Product of ' + str(a) + ' and ' + str(b) + ' is ', mul(a, b)) - print('Division of ' + str(a) + ' and ' + str(b) + ' is ', div(a, b)) \ No newline at end of file + print("Sum of " + str(a) + " and " + str(b) + " is ", add(a, b)) + print("Difference of " + str(a) + " and " + str(b) + " is ", sub(a, b)) + print("Product of " + str(a) + " and " + str(b) + " is ", mul(a, b)) + print("Division of " + str(a) + " and " + str(b) + " is ", div(a, b)) diff --git a/tests/test_calculator.py b/tests/test_calculator.py new file mode 100644 index 00000000..efdc7a33 --- /dev/null +++ b/tests/test_calculator.py @@ -0,0 +1,17 @@ +from calculator import add, div, mul, sub + + +def test_add(): + assert add(1, 1) == 2 + + +def test_sub(): + assert sub(1, 1) == 0 + + +def test_mul(): + assert mul(1, 1) == 1 + + +def test_div(): + assert div(2, 1) == 2 From f3552dfecc337a4340dc1aecebdf01e4902d1ac2 Mon Sep 17 00:00:00 2001 From: Yudhiesh Ravindranath Date: Mon, 5 Jun 2023 13:23:02 +0800 Subject: [PATCH 06/14] Finalise repository for course launch (#8) * remove workflows * remove tests * update gitignore --- .github/workflows/ci_cd_wf.yml | 26 -------- .gitignore | 115 +++++++++++++++++++++++++++------ tests/test_calculator.py | 17 ----- 3 files changed, 94 insertions(+), 64 deletions(-) delete mode 100644 .github/workflows/ci_cd_wf.yml diff --git a/.github/workflows/ci_cd_wf.yml b/.github/workflows/ci_cd_wf.yml deleted file mode 100644 index aada2bac..00000000 --- a/.github/workflows/ci_cd_wf.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: test - -on: - push: - branches: - - main - -jobs: - test: - runs-on: ubuntu-latest - - steps: - - name: Check out repo code - uses: actions/checkout@v3 - - - name: Setup Python - uses: actions/setup-python@v3 - with: - python-version: "3.x" - - - name: Install Dependencies - run: | - python -m pip install -r requirements.txt - - name: Run tests - run: | - python -m pytest tests diff --git a/.gitignore b/.gitignore index f092b1b4..b1cb1601 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,13 @@ # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] +*$py.class # C extensions *.so # Distribution / packaging .Python -env/ build/ develop-eggs/ dist/ @@ -19,9 +19,12 @@ lib64/ parts/ sdist/ var/ +wheels/ +share/python-wheels/ *.egg-info/ .installed.cfg *.egg +MANIFEST # PyInstaller # Usually these files are written by a python script from a template @@ -36,12 +39,17 @@ pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ +.nox/ .coverage .coverage.* .cache nosetests.xml coverage.xml *.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ # Translations *.mo @@ -49,40 +57,105 @@ coverage.xml # Django stuff: *.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy # Sphinx documentation docs/_build/ # PyBuilder +.pybuilder/ target/ -# DotEnv configuration +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/#use-with-ide +.pdm.toml + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments .env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ -# Database -*.db -*.rdb - -# Pycharm -.idea +# Spyder project settings +.spyderproject +.spyproject -# VS Code -.vscode/ +# Rope project settings +.ropeproject -# Spyder -.spyproject/ +# mkdocs documentation +/site -# Jupyter NB Checkpoints -.ipynb_checkpoints/ +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json +# Pyre type checker +.pyre/ -# Mac OS-specific storage files -.DS_Store +# pytype static type analyzer +.pytype/ -# vim -*.swp -*.swo +# Cython debug symbols +cython_debug/ -# Mypy cache -.mypy_cache/ +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ diff --git a/tests/test_calculator.py b/tests/test_calculator.py index efdc7a33..e69de29b 100644 --- a/tests/test_calculator.py +++ b/tests/test_calculator.py @@ -1,17 +0,0 @@ -from calculator import add, div, mul, sub - - -def test_add(): - assert add(1, 1) == 2 - - -def test_sub(): - assert sub(1, 1) == 0 - - -def test_mul(): - assert mul(1, 1) == 1 - - -def test_div(): - assert div(2, 1) == 2 From 965a8d85a03d4f1e21b1a00aa267cad1898fc98e Mon Sep 17 00:00:00 2001 From: PreciousEdmund <131344840+PreciousEdmund@users.noreply.github.com> Date: Wed, 14 Jun 2023 08:31:10 +0000 Subject: [PATCH 07/14] changed test_add to fail --- .github/workflows/ci_cd_wf.yml | 26 ++++++++++++++++++++++++++ tests/test_calculator.py | 14 ++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 .github/workflows/ci_cd_wf.yml diff --git a/.github/workflows/ci_cd_wf.yml b/.github/workflows/ci_cd_wf.yml new file mode 100644 index 00000000..f9c46ac7 --- /dev/null +++ b/.github/workflows/ci_cd_wf.yml @@ -0,0 +1,26 @@ +name : test + +on: + push: + branches: + - main + +jobs: + test: + runs-on : ubuntu-latest + + steps: + - name: Check out repo code + uses: actions/checkout@v3 + + - name: Setup Python + uses: actions/setup-python@v3 + with: + python-version: "3.x" + + - name: Install Dependencies + run: | + python -m pip install -r requirements.txt + - name: Run tests + run: | + python -m pytest calculator.py \ No newline at end of file diff --git a/tests/test_calculator.py b/tests/test_calculator.py index e69de29b..57b27bf0 100644 --- a/tests/test_calculator.py +++ b/tests/test_calculator.py @@ -0,0 +1,14 @@ +from calculator import add, div, mul, sub + + +def test_add(): + assert add(1,1) == 0 + +def test_sub(): + assert sub(1, 1) == 0 + +def test_mul(): + assert mul(1, 1) == 1 + +def test_div(): + assert div(2, 1) == 2 From 7950183f49e8d0bbb7ff9165c89b090f24f1dbe0 Mon Sep 17 00:00:00 2001 From: PreciousEdmund <131344840+PreciousEdmund@users.noreply.github.com> Date: Wed, 14 Jun 2023 09:05:01 +0000 Subject: [PATCH 08/14] changed test_add to fail --- tests/test_calculator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_calculator.py b/tests/test_calculator.py index 57b27bf0..e104a8af 100644 --- a/tests/test_calculator.py +++ b/tests/test_calculator.py @@ -2,7 +2,7 @@ def test_add(): - assert add(1,1) == 0 + assert add(1, 1) == 2 def test_sub(): assert sub(1, 1) == 0 From 957d061575aea08afa1b1a8e5a88b98afdd64a21 Mon Sep 17 00:00:00 2001 From: PreciousEdmund <131344840+PreciousEdmund@users.noreply.github.com> Date: Wed, 14 Jun 2023 15:04:08 +0000 Subject: [PATCH 09/14] changed test_add to pass --- tests/test_calculator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_calculator.py b/tests/test_calculator.py index e104a8af..551ab2db 100644 --- a/tests/test_calculator.py +++ b/tests/test_calculator.py @@ -2,7 +2,7 @@ def test_add(): - assert add(1, 1) == 2 + assert add(1, 1) == 0 def test_sub(): assert sub(1, 1) == 0 From a48591408f0514f00527343206f50bf6cbf7ddce Mon Sep 17 00:00:00 2001 From: PreciousEdmund <131344840+PreciousEdmund@users.noreply.github.com> Date: Wed, 14 Jun 2023 15:13:02 +0000 Subject: [PATCH 10/14] changed test_add to pass --- .github/workflows/ci_cd_wf.yml | 7 ++++++- tests/test_calculator.py | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_cd_wf.yml b/.github/workflows/ci_cd_wf.yml index f9c46ac7..fe5a2b82 100644 --- a/.github/workflows/ci_cd_wf.yml +++ b/.github/workflows/ci_cd_wf.yml @@ -23,4 +23,9 @@ jobs: python -m pip install -r requirements.txt - name: Run tests run: | - python -m pytest calculator.py \ No newline at end of file + python -m pytest calculator.py + - name: Pytest coverage comment + uses: MishaKav/pytest-coverage-comment@main + with: + pytest-coverage-path: ./pytest-coverage.txt + junitxml-path: ./pytest.xml \ No newline at end of file diff --git a/tests/test_calculator.py b/tests/test_calculator.py index 551ab2db..e104a8af 100644 --- a/tests/test_calculator.py +++ b/tests/test_calculator.py @@ -2,7 +2,7 @@ def test_add(): - assert add(1, 1) == 0 + assert add(1, 1) == 2 def test_sub(): assert sub(1, 1) == 0 From c0c96de409068f675b5f3d2a00072605083a2c57 Mon Sep 17 00:00:00 2001 From: PreciousEdmund <131344840+PreciousEdmund@users.noreply.github.com> Date: Wed, 14 Jun 2023 15:24:20 +0000 Subject: [PATCH 11/14] changed test_add to pass --- calculator.py | 1 + 1 file changed, 1 insertion(+) diff --git a/calculator.py b/calculator.py index feefb4e3..969f08a4 100644 --- a/calculator.py +++ b/calculator.py @@ -1,5 +1,6 @@ # Demo Calculator App For Week 1 Project # Addition Method + def add(a, b): return a + b From d29f0f142e826803b0a1bea820d468f2ef1b907b Mon Sep 17 00:00:00 2001 From: PreciousEdmund <131344840+PreciousEdmund@users.noreply.github.com> Date: Mon, 19 Jun 2023 08:54:45 +0000 Subject: [PATCH 12/14] updatedthe Yaml file --- .github/workflows/ci_cd_wf.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci_cd_wf.yml b/.github/workflows/ci_cd_wf.yml index fe5a2b82..8933633b 100644 --- a/.github/workflows/ci_cd_wf.yml +++ b/.github/workflows/ci_cd_wf.yml @@ -21,11 +21,12 @@ jobs: - name: Install Dependencies run: | python -m pip install -r requirements.txt + - name: Run tests run: | python -m pytest calculator.py - - name: Pytest coverage comment - uses: MishaKav/pytest-coverage-comment@main - with: - pytest-coverage-path: ./pytest-coverage.txt - junitxml-path: ./pytest.xml \ No newline at end of file + + - name: Build coverage file + run: | + pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=app test/ | tee pytest-coverage.txt + \ No newline at end of file From b3fc553ed8e37428da181ccacc96292562a2ea85 Mon Sep 17 00:00:00 2001 From: PreciousEdmund <131344840+PreciousEdmund@users.noreply.github.com> Date: Mon, 19 Jun 2023 09:03:13 +0000 Subject: [PATCH 13/14] updated the Yaml file --- .github/workflows/ci_cd_wf.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_cd_wf.yml b/.github/workflows/ci_cd_wf.yml index 8933633b..7f730abf 100644 --- a/.github/workflows/ci_cd_wf.yml +++ b/.github/workflows/ci_cd_wf.yml @@ -27,6 +27,7 @@ jobs: python -m pytest calculator.py - name: Build coverage file - run: | - pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=app test/ | tee pytest-coverage.txt - \ No newline at end of file + uses: MishaKav/pytest-coverage-comment@main + with: + pytest-coverage-path: ./pytest-coverage.txt + junitxml-path: ./pytest.xml \ No newline at end of file From 2c4291147f72f50de2fae4fe33b5e671573b6612 Mon Sep 17 00:00:00 2001 From: PreciousEdmund <131344840+PreciousEdmund@users.noreply.github.com> Date: Mon, 19 Jun 2023 09:10:15 +0000 Subject: [PATCH 14/14] updated the Yaml file --- .github/workflows/ci_cd_wf.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci_cd_wf.yml b/.github/workflows/ci_cd_wf.yml index 7f730abf..fe5a2b82 100644 --- a/.github/workflows/ci_cd_wf.yml +++ b/.github/workflows/ci_cd_wf.yml @@ -21,12 +21,10 @@ jobs: - name: Install Dependencies run: | python -m pip install -r requirements.txt - - name: Run tests run: | python -m pytest calculator.py - - - name: Build coverage file + - name: Pytest coverage comment uses: MishaKav/pytest-coverage-comment@main with: pytest-coverage-path: ./pytest-coverage.txt