|
2 | 2 | name: CI |
3 | 3 |
|
4 | 4 | on: |
5 | | - push: |
6 | | - branches: ["master"] |
7 | | - pull_request: |
8 | | - branches: ["master"] |
9 | | - workflow_dispatch: |
| 5 | + push: |
| 6 | + branches: [master] |
| 7 | + pull_request: |
| 8 | + branches: [master] |
| 9 | + workflow_dispatch: |
10 | 10 |
|
11 | 11 | jobs: |
12 | | - test: |
13 | | - name: "Python ${{ matrix.python-version }}" |
14 | | - runs-on: "ubuntu-latest" |
15 | | - env: |
16 | | - USING_COVERAGE: "3.7,3.8,3.9,3.10" |
| 12 | + test: |
| 13 | + name: Python ${{ matrix.python-version }} |
| 14 | + runs-on: ubuntu-latest |
| 15 | + env: |
| 16 | + USING_COVERAGE: 3.7,3.8,3.9,3.10 |
17 | 17 |
|
18 | | - strategy: |
19 | | - matrix: |
20 | | - python-version: ["3.7", "3.8", "3.9", "3.10"] |
| 18 | + strategy: |
| 19 | + matrix: |
| 20 | + python-version: ['3.7', '3.8', '3.9', '3.10'] |
21 | 21 |
|
22 | | - steps: |
23 | | - - uses: "actions/checkout@v2" |
24 | | - - uses: "actions/setup-python@v2" |
25 | | - with: |
26 | | - python-version: "${{ matrix.python-version }}" |
27 | | - - name: "Install dependencies" |
28 | | - run: | |
29 | | - set -xe |
30 | | - python -VV |
31 | | - python -m site |
32 | | - python -m pip install --upgrade pip |
33 | | - python -m pip install --upgrade coverage[toml] virtualenv tox tox-gh-actions |
34 | | - - name: "Run tox targets for ${{ matrix.python-version }}" |
35 | | - run: "python -m tox" |
| 22 | + steps: |
| 23 | + - uses: actions/checkout@v2 |
| 24 | + - uses: actions/setup-python@v2 |
| 25 | + with: |
| 26 | + python-version: ${{ matrix.python-version }} |
| 27 | + - name: Install dependencies |
| 28 | + run: | |
| 29 | + set -xe |
| 30 | + python -VV |
| 31 | + python -m site |
| 32 | + python -m pip install --upgrade pip |
| 33 | + python -m pip install --upgrade coverage[toml] virtualenv tox tox-gh-actions |
| 34 | + - name: Run tox targets for ${{ matrix.python-version }} |
| 35 | + run: python -m tox |
36 | 36 |
|
37 | | - - name: Prepare coverage artifact |
38 | | - if: ${{ contains(env.USING_COVERAGE, matrix.python-version) }} |
39 | | - uses: aio-libs/prepare-coverage@v21.9.1 |
| 37 | + - name: Prepare coverage artifact |
| 38 | + if: ${{ contains(env.USING_COVERAGE, matrix.python-version) }} |
| 39 | + uses: aio-libs/prepare-coverage@v21.9.1 |
40 | 40 |
|
41 | | - check: |
42 | | - name: Check |
43 | | - if: always() |
44 | | - needs: [test] |
45 | | - runs-on: ubuntu-latest |
46 | | - steps: |
47 | | - - name: Decide whether the needed jobs succeeded or failed |
48 | | - uses: re-actors/alls-green@release/v1 |
49 | | - with: |
50 | | - jobs: ${{ toJSON(needs) }} |
51 | | - - name: Upload coverage |
52 | | - uses: aio-libs/upload-coverage@v21.9.4 |
| 41 | + check: |
| 42 | + name: Check |
| 43 | + if: always() |
| 44 | + needs: [test] |
| 45 | + runs-on: ubuntu-latest |
| 46 | + steps: |
| 47 | + - name: Decide whether the needed jobs succeeded or failed |
| 48 | + uses: re-actors/alls-green@release/v1 |
| 49 | + with: |
| 50 | + jobs: ${{ toJSON(needs) }} |
| 51 | + - name: Upload coverage |
| 52 | + uses: aio-libs/upload-coverage@v21.9.4 |
53 | 53 |
|
54 | | - package: |
55 | | - name: "Build & verify package" |
56 | | - runs-on: "ubuntu-latest" |
| 54 | + package: |
| 55 | + name: Build & verify package |
| 56 | + runs-on: ubuntu-latest |
57 | 57 |
|
58 | | - steps: |
59 | | - - uses: "actions/checkout@v2" |
60 | | - - uses: "actions/setup-python@v2" |
61 | | - with: |
62 | | - python-version: "3.9" |
| 58 | + steps: |
| 59 | + - uses: actions/checkout@v2 |
| 60 | + - uses: actions/setup-python@v2 |
| 61 | + with: |
| 62 | + python-version: '3.9' |
63 | 63 |
|
64 | | - - name: "Install poetry, check-wheel-content, and twine" |
65 | | - run: "python -m pip install build check-wheel-contents twine" |
66 | | - - name: "Build package" |
67 | | - run: "python -m build" |
68 | | - - name: "List result" |
69 | | - run: "ls -l dist" |
70 | | - - name: "Check wheel contents" |
71 | | - run: "check-wheel-contents dist/*.whl" |
72 | | - - name: "Check long_description" |
73 | | - run: "python -m twine check dist/*" |
| 64 | + - name: Install poetry, check-wheel-content, and twine |
| 65 | + run: python -m pip install build check-wheel-contents twine |
| 66 | + - name: Build package |
| 67 | + run: python -m build |
| 68 | + - name: List result |
| 69 | + run: ls -l dist |
| 70 | + - name: Check wheel contents |
| 71 | + run: check-wheel-contents dist/*.whl |
| 72 | + - name: Check long_description |
| 73 | + run: python -m twine check dist/* |
0 commit comments