|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +jobs: |
| 6 | + build: |
| 7 | + |
| 8 | + runs-on: ${{ matrix.os }} |
| 9 | + strategy: |
| 10 | + max-parallel: 4 |
| 11 | + matrix: |
| 12 | + os: [ubuntu-latest, windows-latest] |
| 13 | + python-version: [3.6, 3.7] |
| 14 | + |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v1 |
| 17 | + - name: Set up Python ${{ matrix.python-version }} |
| 18 | + uses: actions/setup-python@v1 |
| 19 | + with: |
| 20 | + python-version: ${{ matrix.python-version }} |
| 21 | + - name: Install dependencies |
| 22 | + run: | |
| 23 | + python -m pip install --upgrade pip |
| 24 | + python -m pip install -r requirements.txt |
| 25 | + - name: Check that documentation builds |
| 26 | + run: | |
| 27 | + python -m pip install sphinx |
| 28 | + python -m pip install sphinx_rtd_theme |
| 29 | + python -m pip install docutils==0.12 |
| 30 | + python -m pip install mock |
| 31 | + cd docs; make clean; make html; cd ..; |
| 32 | + - name: Install testing dependencies |
| 33 | + run: | |
| 34 | + python -m pip install coverage |
| 35 | + python -m pip install hypothesis==3.2 |
| 36 | + python -m pip install mypy |
| 37 | + - name: Run tests and coverage |
| 38 | + run: | |
| 39 | + coverage run --source=axelrod -m unittest discover |
| 40 | + coverage report -m --fail-under=100 |
| 41 | + - name: Run doctest |
| 42 | + run: | |
| 43 | + python doctests.py |
| 44 | + - name: Run static type checker |
| 45 | + run: | |
| 46 | + python run_mypy.py |
| 47 | + - name: Check that all strategies are indexed |
| 48 | + run: | |
| 49 | + python run_strategy_indexer.py |
| 50 | + - name: Check that installs |
| 51 | + run: | |
| 52 | + python setup.py install |
0 commit comments