12
12
- ' [0-9].[0-9]+'
13
13
- ' update/pre-commit-autoupdate'
14
14
schedule :
15
- - cron : ' 0 6 * * *' # Daily 6AM UTC build
15
+ - cron : ' 0 6 * * *' # Daily 6AM UTC build
16
16
17
17
18
18
jobs :
@@ -22,63 +22,57 @@ jobs:
22
22
runs-on : ubuntu-latest
23
23
timeout-minutes : 5
24
24
steps :
25
- - name : Checkout
26
-
27
- - name : Setup Python 3.9
28
- uses : actions/setup-python@v2
29
- with :
30
- python-version : 3.9
31
- # ----------------------------------------------
32
- # ----- install & configure poetry -----
33
- # ----------------------------------------------
34
- - name : Install Poetry
35
- uses : snok/install-poetry@v1
36
- with :
37
- virtualenvs-create : true
38
- virtualenvs-in-project : true
39
- installer-parallel : true
40
- # ----------------------------------------------
41
- # load cached venv if cache exists
42
- # ----------------------------------------------
43
- - name : Load cached venv
44
- id : cached-poetry-dependencies
45
- uses : actions/cache@v2
46
- with :
47
- path : .venv
48
- key : venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
49
- # ----------------------------------------------
50
- # install dependencies if cache does not exist
51
- # ----------------------------------------------
52
- - name : Install dependencies
53
- if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
54
- run : poetry install --no-interaction --no-root
55
- # ----------------------------------------------
56
- # install your root project, if required
57
- # ----------------------------------------------
58
- - name : Install library
59
- run : poetry install --no-interaction
60
- # ----------------------------------------------
61
- # run test suite
62
- # ----------------------------------------------
63
- - name : Run linter
64
- run : |
65
- make lint
66
- # - name: Prepare twine checker
67
- # run: |
68
- # pip install -U twine wheel
69
- # python setup.py sdist bdist_wheel
70
- # - name: Run twine checker
71
- # run: |
72
- # twine check dist/*
25
+ - name : Checkout
26
+
27
+ - name : Setup Python 3.9
28
+ uses : actions/setup-python@v2
29
+ with :
30
+ python-version : 3.9
31
+ # ----------------------------------------------
32
+ # ----- install & configure poetry -----
33
+ # ----------------------------------------------
34
+ - name : Install Poetry
35
+ uses : snok/install-poetry@v1
36
+ with :
37
+ virtualenvs-create : true
38
+ virtualenvs-in-project : true
39
+ installer-parallel : true
40
+ # ----------------------------------------------
41
+ # load cached venv if cache exists
42
+ # ----------------------------------------------
43
+ - name : Load cached venv
44
+ id : cached-poetry-dependencies
45
+ uses : actions/cache@v2
46
+ with :
47
+ path : .venv
48
+ key : venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
49
+ # ----------------------------------------------
50
+ # install dependencies if cache does not exist
51
+ # ----------------------------------------------
52
+ - name : Install dependencies
53
+ if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
54
+ run : poetry install --no-interaction --no-root
55
+ # ----------------------------------------------
56
+ # install your root project, if required
57
+ # ----------------------------------------------
58
+ - name : Install library
59
+ run : poetry install --no-interaction
60
+ # ----------------------------------------------
61
+ # run test suite
62
+ # ----------------------------------------------
63
+ - name : Run linter
64
+ run : |
65
+ make dist
66
+ make lint
73
67
74
68
test-unix :
75
69
name : Test Unix
76
70
needs : lint
77
71
strategy :
78
72
matrix :
79
- os : [ubuntu-latest]
80
- pyver : [3.6, 3.7, 3.8, 3.9, pypy3]
81
- redismod : ["edge", "preview"]
73
+ os : [ ubuntu-latest ]
74
+ pyver : [ 3.6, 3.7, 3.8, 3.9, pypy3 ]
75
+ redismod : [ "preview" ]
82
76
fail-fast : false
83
77
services :
84
78
redis :
@@ -98,75 +92,95 @@ jobs:
98
92
OS : ${{ matrix.os }}
99
93
INSTALL_DIR : ${{ github.workspace }}/redis
100
94
steps :
101
- - name : Checkout
102
-
103
- - name : Setup Python ${{ matrix.pyver }}
104
- uses : actions/setup-python@v2
105
- with :
106
- python-version : ${{ matrix.pyver }}
107
- # ----------------------------------------------
108
- # ----- install & configure poetry -----
109
- # ----------------------------------------------
110
- - name : Install Poetry
111
- uses : snok/install-poetry@v1
112
- with :
113
- virtualenvs-create : true
114
- virtualenvs-in-project : true
115
- installer-parallel : true
116
- # ----------------------------------------------
117
- # load cached venv if cache exists
118
- # ----------------------------------------------
119
- - name : Load cached venv
120
- id : cached-poetry-dependencies
121
- uses : actions/cache@v2
122
- with :
123
- path : .venv
124
- key : venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
125
- # ----------------------------------------------
126
- # install dependencies if cache does not exist
127
- # ----------------------------------------------
128
- - name : Install dependencies
129
- if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
130
- run : poetry install --no-interaction --no-root
131
- # ----------------------------------------------
132
- # install your root project, if required
133
- # ----------------------------------------------
134
- - name : Install library
135
- run : poetry install --no-interaction
136
- - name : Run unittests (redismod:${{ matrix.redismod }}, ${{ matrix.os }})
137
- run : |
138
- make test
139
- poetry run coverage xml
140
- - name : Upload coverage
141
-
142
- with :
143
- file : ./coverage.xml
144
- flags : unit
145
- env_vars : OS
146
- fail_ci_if_error : false
95
+ - name : Checkout
96
+
97
+ - name : Setup Python ${{ matrix.pyver }}
98
+ uses : actions/setup-python@v2
99
+ with :
100
+ python-version : ${{ matrix.pyver }}
101
+ # ----------------------------------------------
102
+ # ----- install & configure poetry -----
103
+ # ----------------------------------------------
104
+ - name : Install Poetry
105
+ uses : snok/install-poetry@v1
106
+ with :
107
+ virtualenvs-create : true
108
+ virtualenvs-in-project : true
109
+ installer-parallel : true
110
+ # ----------------------------------------------
111
+ # load cached venv if cache exists
112
+ # ----------------------------------------------
113
+ - name : Load cached venv
114
+ id : cached-poetry-dependencies
115
+ uses : actions/cache@v2
116
+ with :
117
+ path : .venv
118
+ key : venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
119
+ # ----------------------------------------------
120
+ # install dependencies if cache does not exist
121
+ # ----------------------------------------------
122
+ - name : Install dependencies
123
+ if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
124
+ run : poetry install --no-interaction --no-root
125
+ # ----------------------------------------------
126
+ # install your root project, if required
127
+ # ----------------------------------------------
128
+ - name : Install library
129
+ run : poetry install --no-interaction
130
+ - name : Run unittests (redismod:${{ matrix.redismod }}, ${{ matrix.os }})
131
+ run : |
132
+ make test
133
+ poetry run coverage xml
134
+ - name : Upload coverage
135
+
136
+ with :
137
+ file : ./coverage.xml
138
+ flags : unit
139
+ env_vars : OS
140
+ fail_ci_if_error : false
147
141
148
142
deploy :
149
- name : Deploy
150
- runs-on : ubuntu-latest
151
- needs : test-unix
152
- # Run only on pushing a tag
153
- if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
154
- steps :
155
- - name : Checkout
156
-
157
- - name : Setup Python 3.9
158
- uses : actions/setup-python@v2
159
- with :
160
- python-version : 3.9
161
- - name : Install dependencies
162
- run :
163
- python -m pip install -U pip wheel twine
164
- - name : Make dists
165
- run :
166
- python setup.py sdist bdist_wheel
167
- - name : PyPI upload
168
- env :
169
- TWINE_USERNAME : __token__
170
- TWINE_PASSWORD : ${{ secrets.PYPI_TOKEN }}
171
- run : |
172
- twine upload dist/*
143
+ name : Deploy
144
+ runs-on : ubuntu-latest
145
+ needs : test-unix
146
+ # Run only on pushing a tag
147
+ if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
148
+ steps :
149
+ - name : Checkout
150
+
151
+ - name : Setup Python 3.9
152
+ uses : actions/setup-python@v2
153
+ with :
154
+ python-version : 3.9
155
+ - name : Install Poetry
156
+ uses : snok/install-poetry@v1
157
+ with :
158
+ virtualenvs-create : true
159
+ virtualenvs-in-project : true
160
+ installer-parallel : true
161
+ # ----------------------------------------------
162
+ # load cached venv if cache exists
163
+ # ----------------------------------------------
164
+ - name : Load cached venv
165
+ id : cached-poetry-dependencies
166
+ uses : actions/cache@v2
167
+ with :
168
+ path : .venv
169
+ key : venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
170
+ # ----------------------------------------------
171
+ # install dependencies if cache does not exist
172
+ # ----------------------------------------------
173
+ - name : Install dependencies
174
+ if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
175
+ run : poetry install --no-interaction --no-root
176
+ # ----------------------------------------------
177
+ # install your root project, if required
178
+ # ----------------------------------------------
179
+ - name : Install library
180
+ run : poetry install --no-interaction
181
+ - name : PyPI upload
182
+ env :
183
+ TWINE_USERNAME : __token__
184
+ TWINE_PASSWORD : ${{ secrets.PYPI_TOKEN }}
185
+ run : |
186
+ make upload
0 commit comments