|
6 | 6 | - 'docs/**' |
7 | 7 | - '**/*.rst' |
8 | 8 | - '**/*.md' |
| 9 | + branches: |
| 10 | + - master |
9 | 11 | pull_request: |
10 | 12 | branches: |
11 | 13 | - master |
12 | 14 |
|
13 | 15 | jobs: |
14 | 16 |
|
15 | | - lint: |
16 | | - name: Code linters |
17 | | - runs-on: ubuntu-latest |
18 | | - steps: |
19 | | - - uses: actions/checkout@v2 |
20 | | - - name: install python |
21 | | - uses: actions/setup-python@v2 |
22 | | - with: |
23 | | - python-version: 3.9 |
24 | | - - name: run code linters |
25 | | - run: | |
26 | | - pip install -r dev_requirements.txt |
27 | | - invoke linters |
| 17 | + lint: |
| 18 | + name: Code linters |
| 19 | + runs-on: ubuntu-latest |
| 20 | + steps: |
| 21 | + - uses: actions/checkout@v2 |
| 22 | + - name: install python |
| 23 | + uses: actions/setup-python@v2 |
| 24 | + with: |
| 25 | + python-version: 3.9 |
| 26 | + - name: run code linters |
| 27 | + run: | |
| 28 | + pip install -r dev_requirements.txt |
| 29 | + invoke linters |
28 | 30 |
|
29 | | - run-tests: |
30 | | - runs-on: ubuntu-latest |
31 | | - strategy: |
32 | | - max-parallel: 6 |
33 | | - matrix: |
34 | | - python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', 'pypy-3.7'] |
35 | | - env: |
36 | | - ACTIONS_ALLOW_UNSECURE_COMMANDS: true |
37 | | - name: Python ${{ matrix.python-version }} tests |
38 | | - steps: |
39 | | - - uses: actions/checkout@v2 |
40 | | - - name: install python |
41 | | - uses: actions/setup-python@v2 |
42 | | - with: |
43 | | - python-version: ${{ matrix.python-version }} |
44 | | - - name: run tests |
45 | | - run: | |
46 | | - pip install -r dev_requirements.txt |
47 | | - invoke tests |
48 | | - - name: Upload codecov coverage |
49 | | - uses: codecov/codecov-action@v2 |
50 | | - with: |
51 | | - fail_ci_if_error: false |
52 | | - token: ${{ secrets.CODECOV_TOKEN }} |
| 31 | + run-tests: |
| 32 | + runs-on: ubuntu-latest |
| 33 | + strategy: |
| 34 | + max-parallel: 6 |
| 35 | + matrix: |
| 36 | + python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', 'pypy-3.7'] |
| 37 | + env: |
| 38 | + ACTIONS_ALLOW_UNSECURE_COMMANDS: true |
| 39 | + name: Python ${{ matrix.python-version }} tests |
| 40 | + steps: |
| 41 | + - uses: actions/checkout@v2 |
| 42 | + - name: install python |
| 43 | + uses: actions/setup-python@v2 |
| 44 | + with: |
| 45 | + python-version: ${{ matrix.python-version }} |
| 46 | + - name: run tests |
| 47 | + run: | |
| 48 | + pip install -r dev_requirements.txt |
| 49 | + invoke tests |
| 50 | + - name: Upload codecov coverage |
| 51 | + uses: codecov/codecov-action@v2 |
| 52 | + with: |
| 53 | + fail_ci_if_error: false |
| 54 | + token: ${{ secrets.CODECOV_TOKEN }} |
53 | 55 |
|
54 | | - build_package: |
| 56 | + build_and_test_package: |
55 | 57 | name: Validate building and installing the package |
56 | 58 | runs-on: ubuntu-latest |
| 59 | + strategy: |
| 60 | + matrix: |
| 61 | + extension: ['tar.gz', 'whl'] |
57 | 62 | steps: |
58 | 63 | - uses: actions/checkout@v2 |
59 | 64 | - name: install python |
60 | 65 | uses: actions/setup-python@v2 |
61 | 66 | with: |
62 | 67 | python-version: 3.9 |
63 | | - - name: build and install |
| 68 | + - name: Run installed unit tests |
64 | 69 | run: | |
65 | | - pip install invoke |
66 | | - invoke package |
| 70 | + bash .github/workflows/install_and_test.sh ${{ matrix.extension }} |
0 commit comments