|
1 | 1 | name: test |
2 | 2 |
|
3 | | -on: [push, pull_request] |
| 3 | +on: |
| 4 | + - push |
| 5 | + - pull_request |
4 | 6 |
|
5 | 7 | jobs: |
6 | 8 | build: |
7 | | - name: Test run |
8 | 9 | runs-on: ubuntu-latest |
9 | 10 | strategy: |
10 | 11 | matrix: |
11 | | - python-version: [3.6, 3.7, 3.8, pypy3, 3.9-dev, 3.10-dev] |
12 | | - |
| 12 | + tox_env: |
| 13 | + - py27 |
| 14 | + - py36 |
| 15 | + - py37 |
| 16 | + - py38 |
| 17 | + - py39 |
| 18 | + - pypy3 |
13 | 19 | steps: |
14 | | - - name: Check out code into the Python module directory |
15 | | - uses: actions/checkout@v2 |
16 | | - - name: Setup Python ${{ matrix.python-version }} |
17 | | - uses: actions/setup-python@v2 |
18 | | - if: "!endsWith(matrix.python-version, '-dev')" |
19 | | - with: |
20 | | - python-version: ${{ matrix.python-version }} |
21 | | - - name: Setup test matrix |
22 | | - uses: deadsnakes/action@v2.0.2 |
23 | | - if: endsWith(matrix.python-version, '-dev') |
24 | | - with: |
25 | | - python-version: ${{ matrix.python-version }} |
26 | | - - name: Install dependencies |
27 | | - run: | |
28 | | - python -m pip install --upgrade pip |
29 | | - pip install -r requirements.txt && pip install -r requirements-dev.txt |
30 | | - pip install -e . |
31 | | - - name: Lint with flake8 |
32 | | - run: | |
33 | | - # stop the build if there are Python syntax errors or undefined names |
34 | | - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics |
35 | | - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide |
36 | | - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics |
37 | | - - name: Run unit tests |
38 | | - run: | |
39 | | - py.test test/ |
40 | | - - name: Install tox |
41 | | - run: pip install tox |
42 | | - - name: Run tox e2e tests |
43 | | - run: tox -e integration |
| 20 | + - uses: actions/checkout@v2 |
| 21 | + - name: Fedora Tox with ${{ matrix.tox_env }} |
| 22 | + uses: fedora-python/tox-github-action@v0.4 |
| 23 | + with: |
| 24 | + tox_env: ${{ matrix.tox_env }} |
| 25 | + - uses: actions/setup-python@v2 |
| 26 | + - uses: actions/cache@v2 |
| 27 | + with: |
| 28 | + path: ~/.cache/pip |
| 29 | + key: ${{ runner.os }}-pip |
44 | 30 |
|
45 | 31 | deploy: |
46 | 32 | name: Build deploy |
|
0 commit comments