12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- name: Tests
- on: [push, pull_request]
- jobs:
- unit-test:
- runs-on: ${{ matrix.os }}
- strategy:
- fail-fast: false
- matrix:
- python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', 'pypy-3.8']
- os: [ubuntu-latest, macos-latest, windows-latest]
- exclude:
- - os: macos-latest
- python-version: "pypy3"
- - os: windows-latest
- python-version: "pypy3"
- - os: windows-latest
- python-version: 3.6
- timeout-minutes: 20
- steps:
- - uses: actions/checkout@v2
- - name: Setup Python ${{ matrix.python-version }}
- uses: actions/setup-python@v2
- with:
- python-version: ${{ matrix.python-version }}
- - name: Install pip
- run: python -m pip install --upgrade --disable-pip-version-check "pip>=21.1"
- - name: Get pip cache dir
- id: pip-cache
- run: echo "::set-output name=dir::$(pip cache dir)"
- - name: Cache pip
- uses: actions/cache@v2
- with:
- path: |
- ${{ steps.pip-cache.outputs.dir }}
- ./.tox
- key: ${{ matrix.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('setup.py', '**/requirements.txt') }}
- restore-keys: |
- ${{ matrix.os }}-${{ matrix.python-version }}-pip-
- - name: Install dependencies
- run: make setup-ci
- - name: Run tests
- run: tox -e cov
- env:
- PYTEST_DISCORD_WEBHOOK: ${{ secrets.PYTEST_DISCORD_WEBHOOK }}
- - name: Upload coverage report
- if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8'
- run: |
- python -m pip install --upgrade --disable-pip-version-check coveralls tomli
- coveralls --service=github
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|