diff --git a/.github/workflows/python-linters.yml b/.github/workflows/python-linters.yml new file mode 100644 index 00000000..85588723 --- /dev/null +++ b/.github/workflows/python-linters.yml @@ -0,0 +1,47 @@ +# 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: lint the 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' diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-tests-compatibility.yml similarity index 85% rename from .github/workflows/python-package.yml rename to .github/workflows/python-tests-compatibility.yml index 2288257a..27a71abd 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-tests-compatibility.yml @@ -1,7 +1,7 @@ -# 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 +name: test the package on: push: @@ -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