|
| 1 | +name: Tox tests |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +jobs: |
| 6 | + linting: |
| 7 | + runs-on: ubuntu-latest |
| 8 | + steps: |
| 9 | + - uses: actions/checkout@v2 |
| 10 | + - name: Install OS packages |
| 11 | + run: | |
| 12 | + sudo apt-get -y update |
| 13 | + sudo apt-get install -y rpm |
| 14 | + sudo apt-get install -y libkrb5-dev |
| 15 | + - name: Setup Python |
| 16 | + uses: actions/setup-python@v2 |
| 17 | + with: |
| 18 | + python-version: 3.8 |
| 19 | + - name: Install Tox |
| 20 | + run: pip install tox 'virtualenv<20.21.1' |
| 21 | + - name: Run Linting |
| 22 | + run: tox -e lint |
| 23 | + mypy: |
| 24 | + runs-on: ubuntu-latest |
| 25 | + steps: |
| 26 | + - uses: actions/checkout@v2 |
| 27 | + - name: Install OS packages |
| 28 | + run: | |
| 29 | + sudo apt-get -y update |
| 30 | + sudo apt-get install -y rpm |
| 31 | + sudo apt-get install -y libkrb5-dev |
| 32 | + - name: Setup Python |
| 33 | + uses: actions/setup-python@v2 |
| 34 | + with: |
| 35 | + python-version: 3.9 |
| 36 | + - name: Install Tox |
| 37 | + run: pip install tox 'virtualenv<20.21.1' |
| 38 | + - name: Run MyPy |
| 39 | + run: tox -e mypy |
| 40 | + unit-tests: |
| 41 | + runs-on: ubuntu-latest |
| 42 | + strategy: |
| 43 | + matrix: |
| 44 | + # https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json |
| 45 | + python-version: ["3.8", "3.9", "3.10", "3.11"] |
| 46 | + steps: |
| 47 | + - uses: actions/checkout@v2 |
| 48 | + - name: Set up Python ${{ matrix.python-version }} |
| 49 | + uses: actions/setup-python@v5 |
| 50 | + with: |
| 51 | + python-version: ${{ matrix.python-version }} |
| 52 | + - name: Install OS packages |
| 53 | + run: | |
| 54 | + sudo apt-get -y update |
| 55 | + sudo apt-get install -y rpm |
| 56 | + sudo apt-get install -y libkrb5-dev |
| 57 | + - name: Install Tox |
| 58 | + run: pip install tox 'virtualenv<20.21.1' |
| 59 | + - name: Test on ${{ matrix.python-version }} |
| 60 | + run: tox -e "py${{ matrix.python-version }}" |
| 61 | + coverage: |
| 62 | + runs-on: ubuntu-latest |
| 63 | + steps: |
| 64 | + - uses: actions/checkout@v2 |
| 65 | + - name: Install OS packages |
| 66 | + run: | |
| 67 | + sudo apt-get -y update |
| 68 | + sudo apt-get install -y rpm |
| 69 | + sudo apt-get install -y libkrb5-dev |
| 70 | + - name: Setup Python |
| 71 | + uses: actions/setup-python@v2 |
| 72 | + with: |
| 73 | + python-version: 3.8 |
| 74 | + - name: Install Tox |
| 75 | + run: pip install tox 'virtualenv<20.21.1' |
| 76 | + - name: Install pytest cov |
| 77 | + run: pip install pytest-cov |
| 78 | + - name: Run Tox |
| 79 | + run: tox -e coverage |
| 80 | + security: |
| 81 | + runs-on: ubuntu-latest |
| 82 | + steps: |
| 83 | + - uses: actions/checkout@v2 |
| 84 | + - name: Install OS packages |
| 85 | + run: | |
| 86 | + sudo apt-get -y update |
| 87 | + sudo apt-get install -y rpm |
| 88 | + sudo apt-get install -y libkrb5-dev |
| 89 | + - name: Setup Python |
| 90 | + uses: actions/setup-python@v2 |
| 91 | + with: |
| 92 | + python-version: 3.8 |
| 93 | + - name: Install Tox |
| 94 | + run: pip install tox 'virtualenv<20.21.1' |
| 95 | + - name: Run Tox |
| 96 | + run: tox -e security |
| 97 | + docs: |
| 98 | + runs-on: ubuntu-latest |
| 99 | + steps: |
| 100 | + - uses: actions/checkout@v2 |
| 101 | + - name: Install OS packages |
| 102 | + run: | |
| 103 | + sudo apt-get -y update |
| 104 | + sudo apt-get install -y rpm |
| 105 | + sudo apt-get install -y libkrb5-dev |
| 106 | + - name: Setup Python |
| 107 | + uses: actions/setup-python@v2 |
| 108 | + with: |
| 109 | + python-version: 3.8 |
| 110 | + - name: Install Tox |
| 111 | + run: pip install tox 'virtualenv<20.21.1' |
| 112 | + - name: Run Tox |
| 113 | + run: tox -e docs |
| 114 | + |
0 commit comments