| 1 |
name: CI |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: [master, test] |
| 6 |
pull_request: |
| 7 |
branches: [master, test] |
| 8 |
|
| 9 |
jobs: |
| 10 |
test: |
| 11 |
runs-on: ${{ matrix.os }}-latest |
| 12 |
strategy: |
| 13 |
fail-fast: false |
| 14 |
matrix: |
| 15 |
os: [ubuntu, windows, macos] |
| 16 |
python-version: ['3.8', '3.9', '3.10'] |
| 17 |
include: |
| 18 |
|
| 19 |
- os: macos |
| 20 |
pytest-args: -k 'not(cmd_auto or TestFileWatcher)' |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
exclude: |
| 26 |
- os: windows |
| 27 |
python-version: pypy3 |
| 28 |
steps: |
| 29 |
- if: ${{ matrix.os == 'ubuntu' }} |
| 30 |
run: sudo apt-get install strace |
| 31 |
- uses: actions/checkout@v2 |
| 32 |
- uses: actions/setup-python@v2 |
| 33 |
with: |
| 34 |
python-version: ${{ matrix.python-version }} |
| 35 |
- run: pip install --user -U pip wheel setuptools |
| 36 |
- id: pip-cache |
| 37 |
run: echo "::set-output name=dir::$(pip cache dir)" |
| 38 |
- uses: actions/cache@v2 |
| 39 |
with: |
| 40 |
path: ${{ steps.pip-cache.outputs.dir }} |
| 41 |
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py', 'dev_requirements.txt') }} |
| 42 |
restore-keys: | |
| 43 |
${{ runner.os }}-pip-${{ matrix.python-version }}- |
| 44 |
${{ runner.os }}-pip- |
| 45 |
- run: pip install . -r dev_requirements.txt |
| 46 |
- run: pip freeze |
| 47 |
- run: pip check |
| 48 |
- run: doit pyflakes |
| 49 |
- run: doit codestyle |
| 50 |
- run: py.test -vv ${{ matrix.pytest-args }} |
| 51 |
- if: ${{ matrix.os == 'ubuntu' && matrix.python-version == '3.8' }} |
| 52 |
run: | |
| 53 |
pip install codecov |
| 54 |
doit coverage |
| 55 |
codecov |