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