]> git.phdru.name Git - m_librarian.git/blob - .github/workflows/run-tests.yaml
CI: Migrate from Travis CI to Github Actions
[m_librarian.git] / .github / workflows / run-tests.yaml
1 name: Run tests
2
3 on: [push, pull_request]
4
5 jobs:
6   run-tests:
7
8     strategy:
9       matrix:
10         os: [ubuntu-latest, macos-latest, windows-latest]
11         python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9]
12         include:
13         - os: ubuntu-latest
14           os-name: Linux
15           pip-cache-path: ~/.cache/pip
16         - os: macos-latest
17           os-name: OSX
18           pip-cache-path: ~/Library/Caches/pip
19         - os: windows-latest
20           os-name: w32
21           pip-cache-path: ~\AppData\Local\pip\Cache
22
23     name: Python ${{ matrix.python-version }} @ ${{ matrix.os-name }}
24     runs-on: ${{ matrix.os }}
25
26     steps:
27       - uses: actions/checkout@v2
28       - uses: actions/setup-python@v2
29         with:
30           python-version: ${{ matrix.python-version }}
31       - name: Cache pip
32         uses: actions/cache@v2
33         with:
34           path: ${{ matrix.pip-cache-path }}
35           key: ${{ runner.os }}-pip
36       - name: Install dependencies
37         run: |
38           python --version
39           python -m pip install --upgrade "pip<21.0" "setuptools<45" wheel
40           pip --version
41           python -m pip --version
42           python -m pip install --upgrade virtualenv tox tox-gh-actions
43       - name: Run tox targets for ${{ matrix.python-version }}
44         run: python -m tox