From 95c4269869e12ae52fe35ce78238806afd9866e2 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Tue, 3 Sep 2024 18:52:10 +0200 Subject: [PATCH 1/6] Create python-app.yml --- .github/workflows/python-app.yml | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 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..200872c --- /dev/null +++ b/.github/workflows/python-app.yml @@ -0,0 +1,39 @@ +# 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: Python application + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: "3.10" + - 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 a8bc468e21a546125efb127480adc259b2704065 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Tue, 3 Sep 2024 18:53:11 +0200 Subject: [PATCH 2/6] Update python-app.yml --- .github/workflows/python-app.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 200872c..0b176cd 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -28,12 +28,6 @@ jobs: 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 6599e210de738bbeae97ee1b1da8fc36b8754e72 Mon Sep 17 00:00:00 2001 From: Tristan Brice Velloza Kildaire Date: Wed, 4 Sep 2024 23:56:01 +0200 Subject: [PATCH 3/6] Fixed up test --- .github/workflows/python-app.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 0b176cd..5e965e6 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -28,6 +28,6 @@ jobs: python -m pip install --upgrade pip pip install flake8 pytest if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Test with pytest + - name: Test run: | - pytest + make test From f2f936d846f69bfbddbc78b466e734aefb1abd20 Mon Sep 17 00:00:00 2001 From: Tristan Brice Velloza Kildaire Date: Wed, 4 Sep 2024 23:56:55 +0200 Subject: [PATCH 4/6] Clean up testing --- .github/workflows/python-app.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 5e965e6..acb57ab 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -23,11 +23,6 @@ jobs: uses: actions/setup-python@v3 with: python-version: "3.10" - - 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: Test run: | make test From ef3baf2cd92ff839a8eea6f6a82a35c201235c7e Mon Sep 17 00:00:00 2001 From: Tristan Brice Velloza Kildaire Date: Wed, 4 Sep 2024 23:58:16 +0200 Subject: [PATCH 5/6] Add bade (Will work once active on mark's repo) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a0329b2..2baac07 100755 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Reticulum Network Stack β +Reticulum Network Stack β [![Python application](https://github.com/deavmi/markqvist/actions/workflows/python-app.yml/badge.svg)](https://github.com/deavmi/markqvist/actions/workflows/python-app.yml) ==========

From 3eb8d92028d4a36dbb140356359cfbb8de29c9dd Mon Sep 17 00:00:00 2001 From: Tristan Brice Velloza Kildaire Date: Wed, 4 Sep 2024 23:59:03 +0200 Subject: [PATCH 6/6] Rename --- .github/workflows/python-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index acb57ab..8691377 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -1,7 +1,7 @@ # 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: Python application +name: Test suite on: push: