From bf19a3c5d6b8a57cf4446053dc46eaa9dbbfcfda Mon Sep 17 00:00:00 2001 From: Saravanan G Date: Wed, 9 Aug 2023 20:07:22 +0530 Subject: [PATCH 1/4] Create python-app.yml --- .github/workflows/python-app.yml | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 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..ef1a74f --- /dev/null +++ b/.github/workflows/python-app.yml @@ -0,0 +1,38 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Pytest + +on: + push: + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.9 + uses: actions/setup-python@v3 + with: + python-version: "3.9" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pytest # flake8 + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + # - name: Lint with flake8 + # run: | + # # stop the build if there are Python syntax errors or undefined names + # flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest + run: | + pytest From 1871e6d8a485d68bb0ef2dbd93aa0d90431ae558 Mon Sep 17 00:00:00 2001 From: Saravanan G Date: Wed, 9 Aug 2023 20:15:26 +0530 Subject: [PATCH 2/4] Update and rename python-app.yml to pytest.yml --- .github/workflows/{python-app.yml => pytest.yml} | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) rename .github/workflows/{python-app.yml => pytest.yml} (91%) diff --git a/.github/workflows/python-app.yml b/.github/workflows/pytest.yml similarity index 91% rename from .github/workflows/python-app.yml rename to .github/workflows/pytest.yml index ef1a74f..fe6e62e 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/pytest.yml @@ -24,9 +24,10 @@ jobs: python-version: "3.9" - name: Install dependencies run: | - python -m pip install --upgrade pip + python3 -m pip install --upgrade pip pip install pytest # flake8 if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + working-directory: ./ # - name: Lint with flake8 # run: | # # stop the build if there are Python syntax errors or undefined names @@ -36,3 +37,4 @@ jobs: - name: Test with pytest run: | pytest + working-directory: ./ From c17a74d24ef655f2a6b9f66b532a7cd9bfeae8ba Mon Sep 17 00:00:00 2001 From: Saravanan G Date: Wed, 9 Aug 2023 20:19:54 +0530 Subject: [PATCH 3/4] Update pytest.yml --- .github/workflows/pytest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index fe6e62e..2efda1a 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -36,5 +36,5 @@ jobs: # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest run: | - pytest + pytest ./ working-directory: ./ From abfe0b44a4a16c4b4ecad0b83536883cd5799d8c Mon Sep 17 00:00:00 2001 From: Saravanan G Date: Wed, 9 Aug 2023 20:25:31 +0530 Subject: [PATCH 4/4] Update pytest.yml --- .github/workflows/pytest.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 2efda1a..1eadf8e 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -12,7 +12,7 @@ permissions: contents: read jobs: - build: + pytest: runs-on: ubuntu-latest @@ -27,7 +27,6 @@ jobs: python3 -m pip install --upgrade pip pip install pytest # flake8 if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - working-directory: ./ # - name: Lint with flake8 # run: | # # stop the build if there are Python syntax errors or undefined names @@ -36,5 +35,5 @@ jobs: # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest run: | - pytest ./ - working-directory: ./ + pytest ./show_wordcloud.py +