14
14
jobs :
15
15
test :
16
16
name : Test
17
- runs-on : ${{ matrix.os }}
18
17
strategy :
18
+ fail-fast : true
19
19
matrix :
20
- os : [ubuntu-latest, macos-latest]
21
- python-version : [3.6, 3.7, 3.8, 3.9]
20
+ os : [windows-latest]
21
+ python-version : [3.7, 3.8, 3.9]
22
+ defaults :
23
+ run :
24
+ shell : bash
25
+ runs-on : ${{ matrix.os }}
26
+ env :
27
+ POETRY_VERSION : 1.0.10
22
28
steps :
23
29
- uses : actions/checkout@v2
24
30
25
31
- name : Set up Python ${{ matrix.python-version }}
26
- uses : actions/setup-python@v1
32
+ uses : actions/setup-python@v2
27
33
with :
28
34
python-version : ${{ matrix.python-version }}
29
35
36
+ - name : Cache poetry installation
37
+ uses : actions/cache@v2
38
+ with :
39
+ path : |
40
+ ~/.local/bin/poetry
41
+ ~/.local/share/pypoetry
42
+ C:\Users\runneradmin\AppData\Roaming\Python\Scripts\
43
+ C:\Users\runneradmin\AppData\Roaming\pypoetry\
44
+ key :
45
+ ${{ runner.os }}-poetry-install-${{ matrix.python-version }}-${{
46
+ env.POETRY_VERSION }}
47
+
30
48
- name : Install Poetry
31
- uses : Gr1N/setup -poetry@v4
49
+ uses : snok/install -poetry@v1
32
50
with :
33
- poetry-version : 1.0.10
51
+ version : ${{ env.POETRY_VERSION }}
52
+
53
+ # - name: Install Poetry
54
+ # uses: Gr1N/setup-poetry@v7
55
+ # with:
56
+ # poetry-version: ${{ env.POETRY_VERSION }}
57
+
58
+ # - run:
59
+ # echo "/c/Users/runneradmin/AppData/Roaming/Python/Scripts" >>
60
+ # $GITHUB_PATH
61
+
62
+ # - run:
63
+ # echo "C:\Users\runneradmin\AppData\Roaming\Python\Scripts\bin" >>
64
+ # $GITHUB_PATH
65
+
66
+ - run : |
67
+ echo $PATH
68
+ echo "----"
69
+ ls "C:\Users\runneradmin\AppData\Roaming\Python\Scripts"
70
+ echo "----"
71
+ ls "C:\Users\runneradmin\AppData\Roaming\Python\Scripts/bin"
72
+ echo "----"
73
+ echo "cabbage!"
74
+
75
+ - run : poetry self -V
34
76
35
77
- name : Get poetry cache directory
36
78
id : poetry-cache
@@ -47,41 +89,51 @@ jobs:
47
89
${{ runner.os }}-poetry-${{ matrix.python-version }}-
48
90
49
91
- name : Install dependencies
50
- run : poetry install
92
+ run : poetry install --no-interaction --no-root
51
93
52
94
- name : Test with pytest
53
95
run : poetry run make test
54
96
55
97
format :
56
98
name : Check Code Format
99
+ env :
100
+ POETRY_VERSION : 1.0.10
57
101
runs-on : ubuntu-latest
58
102
steps :
59
103
- uses : actions/checkout@v2
60
104
61
105
- name : Set up Python 3.7
62
- uses : actions/setup-python@v1
106
+ uses : actions/setup-python@v2
63
107
with :
64
108
python-version : 3.7
65
109
110
+ - name : Cache poetry installation
111
+ uses : actions/cache@v2
112
+ with :
113
+ path : |
114
+ ~/.local/
115
+ C:\Users\runneradmin\AppData\Roaming\Python\Scripts\
116
+ key : ${{ runner.os }}-poetry-install-${{ env.POETRY_VERSION }}
117
+
66
118
- name : Install Poetry
67
- uses : Gr1N/setup -poetry@v4
119
+ uses : snok/install -poetry@v1
68
120
with :
69
- poetry- version : 1.0.10
121
+ version : ${{ env.POETRY_VERSION }}
70
122
71
123
- name : Get poetry cache directory
72
124
id : poetry-cache
73
125
run : echo "::set-output name=dir::$(poetry config cache-dir)"
74
126
75
127
- name : Cache poetry dependencies
76
- uses : actions/cache@v1
128
+ uses : actions/cache@v2
77
129
with :
78
130
path : ${{ steps.poetry-cache.outputs.dir }}
79
131
key : ${{ runner.os }}-poetry-3.7-${{ hashFiles('**/poetry.lock') }}
80
132
restore-keys : |
81
133
${{ runner.os }}-poetry-3.7-
82
134
83
135
- name : Install dependencies
84
- run : poetry install
136
+ run : poetry install --no-interaction --no-root
85
137
86
138
- name : Check formatting with black and isort
87
139
run : poetry run make check-format
@@ -90,35 +142,45 @@ jobs:
90
142
name : Release
91
143
if : github.event_name == 'push' && github.ref != 'refs/heads/develop'
92
144
needs : [test, format]
145
+ env :
146
+ POETRY_VERSION : 1.0.10
93
147
runs-on : ubuntu-18.04
94
148
steps :
95
149
- name : Checkout
96
150
uses : actions/checkout@v2
97
151
98
152
- name : Set up Python 3.7
99
- uses : actions/setup-python@v1
153
+ uses : actions/setup-python@v2
100
154
with :
101
155
python-version : 3.7
102
156
157
+ - name : Cache poetry installation
158
+ uses : actions/cache@v2
159
+ with :
160
+ path : |
161
+ ~/.local/
162
+ C:\Users\runneradmin\AppData\Roaming\Python\Scripts\
163
+ key : ${{ runner.os }}-poetry-install-${{ env.POETRY_VERSION }}
164
+
103
165
- name : Install Poetry
104
- uses : Gr1N/setup -poetry@v4
166
+ uses : snok/install -poetry@v1
105
167
with :
106
- poetry- version : 1.0.10
168
+ version : ${{ env.POETRY_VERSION }}
107
169
108
170
- name : Get poetry cache directory
109
171
id : poetry-cache
110
172
run : echo "::set-output name=dir::$(poetry config cache-dir)"
111
173
112
174
- name : Cache poetry dependencies
113
- uses : actions/cache@v1
175
+ uses : actions/cache@v2
114
176
with :
115
177
path : ${{ steps.poetry-cache.outputs.dir }}
116
178
key : ${{ runner.os }}-poetry-3.7-${{ hashFiles('**/poetry.lock') }}
117
179
restore-keys : |
118
180
${{ runner.os }}-poetry-3.7-
119
181
120
182
- name : Install dependencies
121
- run : poetry install
183
+ run : poetry install --no-interaction --no-root
122
184
123
185
- name : Create release and publish
124
186
id : release
0 commit comments