|
| 1 | +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions |
| 2 | +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions |
| 3 | + |
| 4 | +name: Python package |
| 5 | + |
| 6 | +on: |
| 7 | + push: |
| 8 | + branches: [ master ] |
| 9 | + pull_request: |
| 10 | + branches: [ master ] |
| 11 | + |
| 12 | +jobs: |
| 13 | + build: |
| 14 | + |
| 15 | + runs-on: ubuntu-latest |
| 16 | + strategy: |
| 17 | + fail-fast: true |
| 18 | + matrix: |
| 19 | + python-version: ["3.7", "3.8", "3.9", "3.10.1"] |
| 20 | + lxml-version: ["4.1.1", "4.2.6", "4.3.5", "4.4.3", "4.5.2", "4.6.5", "4.7.1"] |
| 21 | + exclude: |
| 22 | + - python-version: 3.9 |
| 23 | + lxml-version: 4.1.1 |
| 24 | + - python-version: 3.9 |
| 25 | + lxml-version: 4.2.6 |
| 26 | + - python-version: 3.10.1 |
| 27 | + lxml-version: 4.1.1 |
| 28 | + - python-version: 3.10.1 |
| 29 | + lxml-version: 4.2.6 |
| 30 | + - python-version: 3.10.1 |
| 31 | + lxml-version: 4.3.5 |
| 32 | + - python-version: 3.10.1 |
| 33 | + lxml-version: 4.4.3 |
| 34 | + - python-version: 3.10.1 |
| 35 | + lxml-version: 4.5.2 |
| 36 | + |
| 37 | + steps: |
| 38 | + - uses: actions/checkout@v2 |
| 39 | + |
| 40 | + - name: Install lxml dependencies |
| 41 | + run: sudo apt-get install -y libxml2-dev libxslt-dev |
| 42 | + |
| 43 | + - name: Set up Python ${{ matrix.python-version }} |
| 44 | + uses: actions/setup-python@v2 |
| 45 | + with: |
| 46 | + python-version: ${{ matrix.python-version }} |
| 47 | + |
| 48 | + - name: Install dependencies |
| 49 | + run: | |
| 50 | + python -m pip install --upgrade pip |
| 51 | + python -m pip install lxml==${{ matrix.lxml-version }} |
| 52 | + python -m pip install -r dev-requirements.txt |
| 53 | + python -m pip install -r requirements.txt |
| 54 | +
|
| 55 | + - name: Lint |
| 56 | + run: | |
| 57 | + make lint |
| 58 | +
|
| 59 | + - name: Test |
| 60 | + run: | |
| 61 | + make test report-coverage |
| 62 | +
|
| 63 | + - name: Security |
| 64 | + uses: jpetrucciani/bandit-check@master |
| 65 | + with: |
| 66 | + bandit_flags: '-lll' |
| 67 | + |
| 68 | + - name: Upload Coverage to Codecov |
| 69 | + uses: codecov/codecov-action@v1 |
0 commit comments