1# This workflow will install dependencies and run tests/linters with a matrix of tox environments. 2 3name: CI 4 5on: 6 push: 7 branches: 8 - master 9 tags: 10 - '**' 11 pull_request: 12 branches: 13 - '**' 14 15jobs: 16 test: 17 18 runs-on: ubuntu-latest 19 strategy: 20 fail-fast: false 21 max-parallel: 4 22 matrix: 23 tox-env: [py37, py38, py39, py310, pypy37, pypy38, pypy39, pygments] 24 include: 25 - tox-env: py37 26 python-version: '3.7' 27 - tox-env: py38 28 python-version: '3.8' 29 - tox-env: py39 30 python-version: '3.9' 31 - tox-env: py310 32 python-version: '3.10' 33 - tox-env: pypy37 34 python-version: pypy-3.7 35 - tox-env: pypy38 36 python-version: pypy-3.8 37 - tox-env: pypy39 38 python-version: pypy-3.9 39 - tox-env: pygments 40 python-version: '3.7' 41 42 env: 43 TOXENV: ${{ matrix.tox-env }} 44 45 steps: 46 - uses: actions/checkout@v2 47 - name: Setup Python ${{ matrix.python-version }} 48 uses: actions/setup-python@v3 49 with: 50 python-version: ${{ matrix.python-version }} 51 - name: Install dependencies 52 run: | 53 sudo apt-get install libtidy-dev 54 python -m pip install --upgrade pip tox coverage codecov 55 - name: Run tox 56 run: python -m tox 57 - name: Upload Results 58 if: success() 59 uses: codecov/codecov-action@v1 60 with: 61 file: ./coverage.xml 62 flags: unittests 63 name: ${{ matrix.tox-env }} 64 fail_ci_if_error: false 65 66 lint: 67 runs-on: ubuntu-latest 68 strategy: 69 fail-fast: false 70 max-parallel: 4 71 matrix: 72 tox-env: [flake8, pep517check, checkspelling] 73 74 env: 75 TOXENV: ${{ matrix.tox-env }} 76 77 steps: 78 - uses: actions/checkout@v2 79 - name: Setup Python 80 uses: actions/setup-python@v2 81 with: 82 python-version: 3.7 83 - name: Install dependencies 84 run: | 85 python -m pip install --upgrade pip tox 86 if [[ "$TOXENV" == 'checkspelling' ]]; then sudo apt-get install aspell aspell-en; fi 87 - name: Run tox 88 run: python -m tox 89