From 0e600e2e1a68bbc04b17c4389139d0580386bdd1 Mon Sep 17 00:00:00 2001 From: Santiago Soto Date: Thu, 31 Oct 2024 12:55:21 -0300 Subject: [PATCH 1/6] Create test.yml --- .github/workflows/test.yml | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..12a9de3 --- /dev/null +++ b/.github/workflows/test.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: [ "dev" ] + pull_request: + branches: [ "dev" ] + +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 959afefbd2567778f2c65f5ccb0d201c175d0cf1 Mon Sep 17 00:00:00 2001 From: Santiago Soto Date: Thu, 31 Oct 2024 12:56:49 -0300 Subject: [PATCH 2/6] Update test.yml --- .github/workflows/test.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 12a9de3..b2dc6a0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.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 33c397765611de196f455169b2f939a79bb25d34 Mon Sep 17 00:00:00 2001 From: Santiago Soto Date: Thu, 31 Oct 2024 12:58:03 -0300 Subject: [PATCH 3/6] Update test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b2dc6a0..85c9016 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ permissions: contents: read jobs: - build: + test: runs-on: ubuntu-latest From 8046fb4756a96cdb57f0a9c1402d8152074774b0 Mon Sep 17 00:00:00 2001 From: Santiago Soto Date: Thu, 31 Oct 2024 13:10:49 -0300 Subject: [PATCH 4/6] Update test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 85c9016..55e74bc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,4 +30,4 @@ jobs: if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Test with pytest run: | - pytest + python -m pytest From c2bc441f20cf701471632d5ab1d6a2ebab456b25 Mon Sep 17 00:00:00 2001 From: Santiago Soto Date: Thu, 31 Oct 2024 13:13:28 -0300 Subject: [PATCH 5/6] Update test.yml --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 55e74bc..296b4c6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,10 +19,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python 3.10 + - name: Set up Python 3.x uses: actions/setup-python@v3 with: - python-version: "3.10" + python-version: "3.x" - name: Install dependencies run: | python -m pip install --upgrade pip From caadd45bac7b486239fcbd24a8d75d799791c19c Mon Sep 17 00:00:00 2001 From: Santiago Soto Date: Thu, 31 Oct 2024 13:14:53 -0300 Subject: [PATCH 6/6] Update test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 296b4c6..874843e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.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: Run pytest on: push: