|
5 | 5 | push:
|
6 | 6 |
|
7 | 7 | jobs:
|
8 |
| - lint: |
| 8 | + linting: |
9 | 9 | runs-on: ubuntu-latest
|
10 | 10 | steps:
|
11 |
| - - name: Setup python 🐍 |
12 |
| - uses: actions/setup-python@v4 |
13 |
| - with: |
14 |
| - python-version: 3.9 |
15 |
| - |
16 |
| - - name: Checkout ⬇️ |
| 11 | + - name: Checkout 🛎️ |
17 | 12 | uses: actions/checkout@v4
|
18 | 13 | with:
|
19 | 14 | persist-credentials: false
|
20 | 15 |
|
21 | 16 | - name: Install dependencies ☕️
|
22 |
| - run: | |
23 |
| - pip install -U pip setuptools |
24 |
| - pip install .[dev] |
| 17 | + run: pip install .[dev] |
25 | 18 |
|
26 | 19 | - name: Lint 🔍
|
27 |
| - run: ./tests/lint.sh |
| 20 | + run: ./tests/linting.sh |
28 | 21 |
|
29 |
| - pypi: |
| 22 | + typecheck: |
30 | 23 | runs-on: ubuntu-latest
|
| 24 | + strategy: |
| 25 | + fail-fast: false |
| 26 | + matrix: |
| 27 | + python: ["38", "39", "310", "311"] |
| 28 | + name: typecheck (python ${{ matrix.python }}) |
31 | 29 | steps:
|
32 |
| - - name: Setup python 🐍 |
33 |
| - uses: actions/setup-python@v4 |
34 |
| - with: |
35 |
| - python-version: 3.9 |
36 |
| - |
37 |
| - - name: Checkout ⬇️ |
| 30 | + - name: Checkout 🛎️ |
38 | 31 | uses: actions/checkout@v4
|
39 | 32 | with:
|
40 | 33 | persist-credentials: false
|
41 | 34 |
|
42 | 35 | - name: Install dependencies ☕️
|
43 |
| - run: | |
44 |
| - pip install -U pip setuptools |
45 |
| - pip install -U twine build |
| 36 | + run: pip install .[dev] |
46 | 37 |
|
47 |
| - - name: Check bundling 📦 |
48 |
| - run: python -m build |
| 38 | + - name: Typecheck 📋 |
| 39 | + run: ./tests/typecheck.sh |
49 | 40 |
|
50 |
| - - name: Check setup 🚦 |
51 |
| - run: twine check "dist/order-*.tar.gz" |
52 |
| - |
53 |
| - test: |
| 41 | + unittest: |
54 | 42 | runs-on: ubuntu-latest
|
55 | 43 | strategy:
|
56 | 44 | fail-fast: false
|
57 | 45 | matrix:
|
58 |
| - python-version: |
59 |
| - - "3.7" |
60 |
| - - "3.8" |
61 |
| - - "3.9" |
62 |
| - - "3.10" |
63 |
| - - "3.11" |
64 |
| - - "3.12" |
65 |
| - name: test (python ${{ matrix.python-version }}) |
| 46 | + python: ["37", "38", "39", "310", "311"] |
| 47 | + name: unittest (python ${{ matrix.python }}) |
66 | 48 | steps:
|
67 |
| - - name: Setup Python ${{ matrix.python-version }} 🐍 |
68 |
| - uses: actions/setup-python@v4 |
69 |
| - with: |
70 |
| - python-version: ${{ matrix.python-version }} |
71 |
| - |
72 |
| - - name: Checkout ⬇️ |
| 49 | + - name: Checkout 🛎️ |
73 | 50 | uses: actions/checkout@v4
|
74 | 51 | with:
|
75 | 52 | persist-credentials: false
|
76 | 53 |
|
77 | 54 | - name: Install dependencies ☕️
|
78 |
| - run: | |
79 |
| - pip install -U pip setuptools |
80 |
| - pip install .[dev] |
| 55 | + run: pip install .[dev] |
81 | 56 |
|
82 | 57 | - name: Test 🎢
|
83 |
| - run: | |
84 |
| - ./tests/test.sh |
| 58 | + run: ./tests/unittest.sh |
85 | 59 |
|
86 |
| - coverage: |
| 60 | + pypi: |
87 | 61 | runs-on: ubuntu-latest
|
88 | 62 | steps:
|
| 63 | + - name: Checkout 🛎️ |
| 64 | + uses: actions/checkout@v4 |
| 65 | + with: |
| 66 | + persist-credentials: false |
| 67 | + |
89 | 68 | - name: Setup python 🐍
|
90 |
| - uses: actions/setup-python@v4 |
| 69 | + uses: actions/setup-python@v5 |
91 | 70 | with:
|
92 | 71 | python-version: 3.9
|
93 | 72 |
|
| 73 | + - name: Install dependencies ☕️ |
| 74 | + run: | |
| 75 | + pip install -U pip setuptools |
| 76 | + pip install -U twine build |
| 77 | +
|
| 78 | + - name: Check bundling 📦 |
| 79 | + run: python -m build |
| 80 | + |
| 81 | + - name: Check setup 🚦 |
| 82 | + run: twine check "dist/order-*.tar.gz" |
| 83 | + |
| 84 | + coverage: |
| 85 | + runs-on: ubuntu-latest |
| 86 | + steps: |
94 | 87 | - name: Checkout ⬇️
|
95 | 88 | uses: actions/checkout@v4
|
96 | 89 | with:
|
97 | 90 | persist-credentials: false
|
| 91 | + submodules: recursive |
98 | 92 |
|
99 | 93 | - name: Install dependencies ☕️
|
100 |
| - run: | |
101 |
| - pip install -U pip setuptools |
102 |
| - pip install .[dev] |
| 94 | + run: pip install .[dev] |
103 | 95 |
|
104 | 96 | - name: Run coverage test 🎢
|
105 |
| - run: | |
106 |
| - pytest --cov=order --cov-report xml:coverage.xml tests |
| 97 | + run: ./tests/coverage.sh |
107 | 98 |
|
108 | 99 | - name: Upload report 🔝
|
109 |
| - uses: codecov/codecov-action@v2 |
| 100 | + uses: codecov/codecov-action@v3 |
110 | 101 | with:
|
111 | 102 | token: ${{ secrets.CODECOV_TOKEN }}
|
112 | 103 | files: ./coverage.xml
|
113 | 104 | flags: unittests
|
| 105 | + fail_ci_if_error: false |
0 commit comments