@@ -18,47 +18,13 @@ jobs:
1818 steps :
1919 - name : Checkout
2020 uses : actions/checkout@v3
21-
22- - name : Set up Python 3.8
23- uses : actions/setup-python@v4
24- id : setup_python
25- with :
26- python-version : " 3.8"
27-
28- - name : Cache venv
29- id : cache-venv
30- uses : actions/cache@v3
31- with :
32- path : .venv
33- key : venv-v1-test-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
34-
35- - name : Cache pre-commit
36- id : cache-pre-commit
37- uses : actions/cache@v3
38- with :
39- path : ~/.cache/pre-commit
40- key : pre-commit-v1-test-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('.pre-commit-config.yaml') }}
41-
42- - name : Cache setup-poetry
43- id : cache-setup-poetry
44- uses : actions/cache@v3
45- with :
46- path : |
47- ~/.local/share/pypoetry
48- ~/.local/share/virtualenv
49- ~/.local/bin/poetry
50- key : setup-poetry-v1-${{ runner.os }}-${{ env.POETRY_VERSION }}
51-
52- - name : Setup poetry
53- uses : Gr1N/setup-poetry@v7
54- id : setup_poetry
55- if : steps.cache-setup-poetry.outputs.cache-hit != 'true'
21+ - name : Setup
22+ uses : ./.github/actions/setup
5623 with :
24+ type : test
25+ python-version : " 3.10"
5726 poetry-version : ${{ env.POETRY_VERSION }}
5827
59- - name : Bootstrap environment
60- run : |
61- make dev EXTRAS=test
6228
6329 - name : Style
6430 run : |
@@ -76,28 +42,16 @@ jobs:
7642 python-version : ["3.7", "3.8", "3.9", "3.10", "3.11-dev"]
7743
7844 steps :
45+
7946 - name : Checkout
8047 uses : actions/checkout@v3
8148
82- - name : Set up Python ${{ matrix.python-version }}
83- uses : actions/setup-python@v4
84- id : setup_python
49+ - name : Setup
50+ uses : ./.github/actions/setup
8551 with :
52+ type : test
8653 python-version : ${{ matrix.python-version }}
87-
88- - name : Cache venv
89- id : cache-venv
90- uses : actions/cache@v3
91- with :
92- path : .venv
93- key : venv-v1-test-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
94-
95- - name : Setup poetry
96- uses : Gr1N/setup-poetry@v7
97-
98- - name : Bootstrap test environment
99- run : |
100- make dev EXTRAS=test
54+ poetry-version : ${{ env.POETRY_VERSION }}
10155
10256 - name : Test
10357 run : |
@@ -113,23 +67,13 @@ jobs:
11367 - name : Checkout
11468 uses : actions/checkout@v3
11569
116- - name : Set up Python
117- uses : actions/setup-python@v4
118- id : setup_python
70+ - name : Setup
71+ uses : ./.github/actions/setup
11972 with :
120- python-version : " 3.10"
121-
122- - name : Cache venv
123- id : cache-venv
124- uses : actions/cache@v3
125- with :
126- path : .venv
127- key : venv-v1-doc-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
73+ type : doc
74+ python-version : ${{ matrix.python-version }}
75+ poetry-version : ${{ env.POETRY_VERSION }}
12876
129- - uses : Gr1N/setup-poetry@v7
130- - name : Bootstrap test environment
131- run : |
132- make dev EXTRAS=doc
13377 - name : Test
13478 run : |
13579 make doc
0 commit comments