From 62568eadc070eb7ea1757b751e0c5e61f98ccc68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Han=C3=A1k?= <47626173+phanak-sap@users.noreply.github.com> Date: Mon, 3 Oct 2022 12:32:04 +0200 Subject: [PATCH 1/6] Create python-linters --- .github/workflows/python-linters | 47 ++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/python-linters diff --git a/.github/workflows/python-linters b/.github/workflows/python-linters new file mode 100644 index 00000000..48722673 --- /dev/null +++ b/.github/workflows/python-linters @@ -0,0 +1,47 @@ +# 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: Python package + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.10.1"] + lxml-version: ["4.9.1"] + + steps: + - uses: actions/checkout@v2 + + - name: Install lxml dependencies + run: sudo apt-get install -y libxml2-dev libxslt-dev + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install lxml==${{ matrix.lxml-version }} + python -m pip install -r dev-requirements.txt + python -m pip install -r requirements.txt + + - name: Lint + run: | + make lint + + - name: Security + uses: jpetrucciani/bandit-check@master + with: + bandit_flags: '-lll' From 823f42124a9af8a290f8396ef1cfde29add8a1cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Han=C3=A1k?= <47626173+phanak-sap@users.noreply.github.com> Date: Mon, 3 Oct 2022 12:33:58 +0200 Subject: [PATCH 2/6] Update python-linters --- .github/workflows/python-linters | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-linters b/.github/workflows/python-linters index 48722673..4fee16b6 100644 --- a/.github/workflows/python-linters +++ b/.github/workflows/python-linters @@ -1,4 +1,4 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# This workflow will install Python dependencies and run linters for the codebase # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions name: Python package From 2f151dbe508e78c0b931cff9e1db967636701429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Han=C3=A1k?= <47626173+phanak-sap@users.noreply.github.com> Date: Mon, 3 Oct 2022 12:34:39 +0200 Subject: [PATCH 3/6] Update and rename python-package.yml to python-tests-compatibility.yml + drop linters from all version builds --- ...hon-package.yml => python-tests-compatibility.yml} | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) rename .github/workflows/{python-package.yml => python-tests-compatibility.yml} (86%) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-tests-compatibility.yml similarity index 86% rename from .github/workflows/python-package.yml rename to .github/workflows/python-tests-compatibility.yml index 2288257a..fcb0bb05 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-tests-compatibility.yml @@ -1,4 +1,4 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# This workflow will install Python dependencies, run tests with variety of Python versions # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions name: Python package @@ -52,18 +52,9 @@ jobs: python -m pip install -r dev-requirements.txt python -m pip install -r requirements.txt - - name: Lint - run: | - make lint - - name: Test run: | make test report-coverage - - name: Security - uses: jpetrucciani/bandit-check@master - with: - bandit_flags: '-lll' - - name: Upload Coverage to Codecov uses: codecov/codecov-action@v1 From ac483fd8403f8ae02d857a6d020f0eadee91c179 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Han=C3=A1k?= <47626173+phanak-sap@users.noreply.github.com> Date: Mon, 3 Oct 2022 12:37:23 +0200 Subject: [PATCH 4/6] Update python-tests-compatibility.yml --- .github/workflows/python-tests-compatibility.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-tests-compatibility.yml b/.github/workflows/python-tests-compatibility.yml index fcb0bb05..27a71abd 100644 --- a/.github/workflows/python-tests-compatibility.yml +++ b/.github/workflows/python-tests-compatibility.yml @@ -1,7 +1,7 @@ # This workflow will install Python dependencies, run tests with variety of Python versions # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions -name: Python package +name: test the package on: push: From bfdd1d963f4344f0db366d9f2762a0ac49d47198 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Han=C3=A1k?= <47626173+phanak-sap@users.noreply.github.com> Date: Mon, 3 Oct 2022 12:37:31 +0200 Subject: [PATCH 5/6] Update python-linters --- .github/workflows/python-linters | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-linters b/.github/workflows/python-linters index 4fee16b6..85588723 100644 --- a/.github/workflows/python-linters +++ b/.github/workflows/python-linters @@ -1,7 +1,7 @@ # This workflow will install Python dependencies and run linters for the codebase # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions -name: Python package +name: lint the package on: push: From a4c23c1989241b8ba9fe0f70f70a87f03a99cf07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Han=C3=A1k?= <47626173+phanak-sap@users.noreply.github.com> Date: Mon, 3 Oct 2022 12:50:32 +0200 Subject: [PATCH 6/6] Rename python-linters to python-linters.yml --- .github/workflows/{python-linters => python-linters.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{python-linters => python-linters.yml} (100%) diff --git a/.github/workflows/python-linters b/.github/workflows/python-linters.yml similarity index 100% rename from .github/workflows/python-linters rename to .github/workflows/python-linters.yml