|
8 | 8 | branches: |
9 | 9 | - master |
10 | 10 |
|
11 | | - |
12 | 11 | jobs: |
13 | 12 | cs: |
14 | 13 | name: Coding style checks |
15 | 14 | runs-on: ubuntu-latest |
16 | 15 | steps: |
17 | | - - uses: actions/checkout@v3 |
18 | | - - name: Set up Python 3.8 |
19 | | - uses: actions/setup-python@v4 |
20 | | - id: setup_python |
21 | | - with: |
22 | | - python-version: '3.8' |
23 | | - |
24 | | - - name: Cache venv |
25 | | - id: cache-venv |
26 | | - uses: actions/cache@v3 |
27 | | - with: |
28 | | - path: .venv |
29 | | - key: venv-v1-test-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('poetry.lock') }} |
30 | | - |
31 | | - - name: Cache pre-commit |
32 | | - id: cache-pre-commit |
33 | | - uses: actions/cache@v3 |
34 | | - with: |
35 | | - path: ~/.cache/pre-commit |
36 | | - key: pre-commit-v1-test-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('.pre-commit-config.yaml') }} |
37 | | - |
38 | | - - uses: Gr1N/setup-poetry@v7 |
39 | | - - name: Bootstrap environment |
40 | | - run: | |
41 | | - make dev EXTRAS=test |
42 | | - - name: Style |
43 | | - run: | |
44 | | - make precommit |
45 | | - - name: Lint |
46 | | - run: | |
47 | | - make mypy |
| 16 | + - name: Checkout |
| 17 | + uses: actions/checkout@v3 |
| 18 | + |
| 19 | + - name: Set up Python 3.8 |
| 20 | + uses: actions/setup-python@v4 |
| 21 | + id: setup_python |
| 22 | + with: |
| 23 | + python-version: "3.8" |
| 24 | + |
| 25 | + - name: Cache venv |
| 26 | + id: cache-venv |
| 27 | + uses: actions/cache@v3 |
| 28 | + with: |
| 29 | + path: .venv |
| 30 | + key: venv-v1-test-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('poetry.lock') }} |
| 31 | + |
| 32 | + - name: Cache pre-commit |
| 33 | + id: cache-pre-commit |
| 34 | + uses: actions/cache@v3 |
| 35 | + with: |
| 36 | + path: ~/.cache/pre-commit |
| 37 | + key: pre-commit-v1-test-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('.pre-commit-config.yaml') }} |
| 38 | + |
| 39 | + - name: Setup poetry |
| 40 | + uses: Gr1N/setup-poetry@v7 |
| 41 | + |
| 42 | + - name: Bootstrap environment |
| 43 | + run: | |
| 44 | + make dev EXTRAS=test |
| 45 | +
|
| 46 | + - name: Style |
| 47 | + run: | |
| 48 | + make precommit |
| 49 | +
|
| 50 | + - name: Lint |
| 51 | + run: | |
| 52 | + make mypy |
48 | 53 |
|
49 | 54 | test: |
50 | 55 | name: Test with python ${{ matrix.python-version }} |
51 | 56 | runs-on: ubuntu-latest |
52 | 57 | strategy: |
53 | 58 | matrix: |
54 | | - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11-dev'] |
| 59 | + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11-dev"] |
55 | 60 |
|
56 | 61 | steps: |
57 | | - - uses: actions/checkout@v3 |
58 | | - |
59 | | - - name: Set up Python ${{ matrix.python-version }} |
60 | | - uses: actions/setup-python@v4 |
61 | | - id: setup_python |
62 | | - with: |
63 | | - python-version: ${{ matrix.python-version }} |
64 | | - |
65 | | - - name: Cache venv |
66 | | - id: cache-venv |
67 | | - uses: actions/cache@v3 |
68 | | - with: |
69 | | - path: .venv |
70 | | - key: venv-v1-test-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('poetry.lock') }} |
71 | | - |
72 | | - - uses: Gr1N/setup-poetry@v7 |
73 | | - - name: Bootstrap test environment |
74 | | - run: | |
75 | | - make dev EXTRAS=test |
76 | | - - name: Test |
77 | | - run: | |
78 | | - make cov |
79 | | - - name: Codecov upload |
80 | | - uses: codecov/codecov-action@v2.1.0 |
| 62 | + - name: Checkout |
| 63 | + uses: actions/checkout@v3 |
| 64 | + |
| 65 | + - name: Set up Python ${{ matrix.python-version }} |
| 66 | + uses: actions/setup-python@v4 |
| 67 | + id: setup_python |
| 68 | + with: |
| 69 | + python-version: ${{ matrix.python-version }} |
| 70 | + |
| 71 | + - name: Cache venv |
| 72 | + id: cache-venv |
| 73 | + uses: actions/cache@v3 |
| 74 | + with: |
| 75 | + path: .venv |
| 76 | + key: venv-v1-test-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('poetry.lock') }} |
| 77 | + |
| 78 | + - name: Setup poetry |
| 79 | + uses: Gr1N/setup-poetry@v7 |
| 80 | + |
| 81 | + - name: Bootstrap test environment |
| 82 | + run: | |
| 83 | + make dev EXTRAS=test |
| 84 | +
|
| 85 | + - name: Test |
| 86 | + run: | |
| 87 | + make cov |
| 88 | +
|
| 89 | + - name: Codecov upload |
| 90 | + uses: codecov/codecov-action@v2.1.0 |
81 | 91 |
|
82 | 92 | test-doc: |
83 | 93 | name: Test doc build |
84 | 94 | runs-on: ubuntu-latest |
85 | 95 | steps: |
86 | | - - uses: actions/checkout@v3 |
87 | | - - name: Set up Python |
88 | | - uses: actions/setup-python@v4 |
89 | | - id: setup_python |
90 | | - with: |
91 | | - python-version: "3.10" |
92 | | - |
93 | | - - name: Cache venv |
94 | | - id: cache-venv |
95 | | - uses: actions/cache@v3 |
96 | | - with: |
97 | | - path: .venv |
98 | | - key: venv-v1-doc-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('poetry.lock') }} |
99 | | - |
100 | | - - uses: Gr1N/setup-poetry@v7 |
101 | | - - name: Bootstrap test environment |
102 | | - run: | |
103 | | - make dev EXTRAS=doc |
104 | | - - name: Test |
105 | | - run: | |
106 | | - make doc |
| 96 | + - name: Checkout |
| 97 | + uses: actions/checkout@v3 |
| 98 | + |
| 99 | + - name: Set up Python |
| 100 | + uses: actions/setup-python@v4 |
| 101 | + id: setup_python |
| 102 | + with: |
| 103 | + python-version: "3.10" |
| 104 | + |
| 105 | + - name: Cache venv |
| 106 | + id: cache-venv |
| 107 | + uses: actions/cache@v3 |
| 108 | + with: |
| 109 | + path: .venv |
| 110 | + key: venv-v1-doc-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('poetry.lock') }} |
| 111 | + |
| 112 | + - uses: Gr1N/setup-poetry@v7 |
| 113 | + - name: Bootstrap test environment |
| 114 | + run: | |
| 115 | + make dev EXTRAS=doc |
| 116 | + - name: Test |
| 117 | + run: | |
| 118 | + make doc |
0 commit comments