From efe95f2869c076ad0d7f6960beced55b1c46c0f9 Mon Sep 17 00:00:00 2001 From: Raghu <56192467+samplepython@users.noreply.github.com> Date: Fri, 10 Sep 2021 11:41:44 -0400 Subject: [PATCH 1/4] Create 8python-app.yml --- .github/workflows/8python-app.yml | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/8python-app.yml diff --git a/.github/workflows/8python-app.yml b/.github/workflows/8python-app.yml new file mode 100644 index 00000000..70bba55c --- /dev/null +++ b/.github/workflows/8python-app.yml @@ -0,0 +1,36 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Python application + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.9 + uses: actions/setup-python@v2 + with: + python-version: 3.9 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 pytest + 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 bd7393f1323e278d816617414b444c281f7710be Mon Sep 17 00:00:00 2001 From: Raghu <56192467+samplepython@users.noreply.github.com> Date: Fri, 10 Sep 2021 11:47:48 -0400 Subject: [PATCH 2/4] Update 8python-app.yml --- .github/workflows/8python-app.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/8python-app.yml b/.github/workflows/8python-app.yml index 70bba55c..3cb57e5d 100644 --- a/.github/workflows/8python-app.yml +++ b/.github/workflows/8python-app.yml @@ -23,6 +23,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip + apt update && apt install docker.io pip install flake8 pytest if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Lint with flake8 From 82315066c77eb2085449fed91edc438c6339e206 Mon Sep 17 00:00:00 2001 From: Raghu <56192467+samplepython@users.noreply.github.com> Date: Fri, 10 Sep 2021 11:57:00 -0400 Subject: [PATCH 3/4] Update 8python-app.yml --- .github/workflows/8python-app.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/8python-app.yml b/.github/workflows/8python-app.yml index 3cb57e5d..a6289780 100644 --- a/.github/workflows/8python-app.yml +++ b/.github/workflows/8python-app.yml @@ -23,9 +23,11 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - apt update && apt install docker.io pip install flake8 pytest if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Install Docker + run: | + apt update && apt install docker.io - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names From 677aa59bd604d1a11dd715a9cb94112cffe8222e Mon Sep 17 00:00:00 2001 From: Raghu <56192467+samplepython@users.noreply.github.com> Date: Fri, 10 Sep 2021 11:59:03 -0400 Subject: [PATCH 4/4] Update 8python-app.yml --- .github/workflows/8python-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/8python-app.yml b/.github/workflows/8python-app.yml index a6289780..f30b71fb 100644 --- a/.github/workflows/8python-app.yml +++ b/.github/workflows/8python-app.yml @@ -27,7 +27,7 @@ jobs: if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Install Docker run: | - apt update && apt install docker.io + apt install docker.io - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names