From 7cb164aed91eea400920777c4bc8f28853b13d84 Mon Sep 17 00:00:00 2001 From: Tomas Pytel Date: Wed, 9 Apr 2025 15:03:19 +0200 Subject: [PATCH 1/4] Update python-package.yml --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 146b2aa..806f4bc 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -18,7 +18,7 @@ jobs: python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@main - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: From 1be4016958706fe4123ed6ae884cc36e4c062aa0 Mon Sep 17 00:00:00 2001 From: Tomas Pytel Date: Wed, 9 Apr 2025 15:21:00 +0200 Subject: [PATCH 2/4] Update python-package.yml --- .github/workflows/python-package.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 806f4bc..2bb63d4 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -11,32 +11,36 @@ on: jobs: build: - runs-on: ubuntu-latest strategy: matrix: python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] steps: - - uses: actions/checkout@main + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + - name: Install dependencies run: | python -m pip install --upgrade pip python -m 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: | - python3 -m pytest --cov=sheet2dict -v tests/ --disable-warnings + python -m pytest --cov=sheet2dict -v tests/ --disable-warnings + + - name: CodeCov + run: bash <(curl -s https://codecov.io/bash) + - name: CodeCov run: bash <(curl -s https://codecov.io/bash) From 8a71ade41954cccf6b2e3dce6eb05a4fc3dc2516 Mon Sep 17 00:00:00 2001 From: Tomas Pytel Date: Wed, 9 Apr 2025 15:36:14 +0200 Subject: [PATCH 3/4] Update python-package.yml --- .github/workflows/python-package.yml | 63 +++++++++++----------------- 1 file changed, 24 insertions(+), 39 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 2bb63d4..04368fe 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -1,46 +1,31 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: Test Python package - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 strategy: matrix: python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - - name: Lint with flake8 - run: | - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - - name: Test with pytest - run: | - python -m pytest --cov=sheet2dict -v tests/ --disable-warnings - - - name: CodeCov - run: bash <(curl -s https://codecov.io/bash) - - - - name: CodeCov - run: bash <(curl -s https://codecov.io/bash) + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + + - name: Lint with flake8 + run: | + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + + - name: Test with pytest + run: | + python -m pytest --cov=sheet2dict -v tests/ --disable-warnings + + - name: CodeCov + run: bash <(curl -s https://codecov.io/bash) From f1919b1d5b22d25bfb94dde0ff34a0cd63d4f868 Mon Sep 17 00:00:00 2001 From: Tomas Pytel Date: Wed, 9 Apr 2025 19:39:13 +0200 Subject: [PATCH 4/4] Update python-package.yml --- .github/workflows/python-package.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 04368fe..13941cc 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -1,3 +1,14 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Test Python package + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + jobs: build: runs-on: ubuntu-22.04