@@ -2,24 +2,24 @@ name: Development
2
2
on :
3
3
push :
4
4
branches :
5
- - ' ** ' # every branch
6
- - ' !gh-pages' # exclude gh-pages branch
7
- - ' !stage*' # exclude branches beginning with stage
5
+ - " ** " # every branch
6
+ - " !gh-pages" # exclude gh-pages branch
7
+ - " !stage*" # exclude branches beginning with stage
8
8
tags :
9
9
- ' \d+\.\d+\.\d+' # only semver tags
10
10
pull_request :
11
11
branches :
12
- - ' ** ' # every branch
13
- - ' !gh-pages' # exclude gh-pages branch
14
- - ' !stage*' # exclude branches beginning with stage
12
+ - " ** " # every branch
13
+ - " !gh-pages" # exclude gh-pages branch
14
+ - " !stage*" # exclude branches beginning with stage
15
15
jobs :
16
16
build :
17
17
runs-on : ubuntu-latest
18
18
strategy :
19
19
matrix :
20
20
include :
21
- - py_ver : 3.8
22
- distro : alpine
21
+ - py_ver : " 3.9 "
22
+ distro : debian
23
23
image : djbase
24
24
env :
25
25
PY_VER : ${{matrix.py_ver}}
28
28
DOCKER_CLIENT_TIMEOUT : " 120"
29
29
COMPOSE_HTTP_TIMEOUT : " 120"
30
30
steps :
31
- - uses : actions/checkout@v2
31
+ - uses : actions/checkout@v3
32
32
- name : Validate version and release notes
33
33
run : |
34
34
DJ_VERSION=$(grep -oP '\d+\.\d+\.\d+' datajoint/version.py)
44
44
export HOST_UID=$(id -u)
45
45
docker-compose -f docker-compose-build.yaml up --exit-code-from app --build
46
46
echo "DJ_VERSION=${DJ_VERSION}" >> $GITHUB_ENV
47
- - if : matrix.py_ver == '3.8 ' && matrix.distro == 'alpine '
47
+ - if : matrix.py_ver == '3.9 ' && matrix.distro == 'debian '
48
48
name : Add pip artifacts
49
- uses : actions/upload-artifact@v2
49
+ uses : actions/upload-artifact@v3
50
50
with :
51
51
name : pip-datajoint-${{env.DJ_VERSION}}
52
52
path : dist
@@ -55,13 +55,15 @@ jobs:
55
55
runs-on : ubuntu-latest
56
56
strategy :
57
57
matrix :
58
- py_ver : ["3.8 "]
58
+ py_ver : ["3.9 "]
59
59
mysql_ver : ["8.0", "5.7"]
60
60
include :
61
+ - py_ver : " 3.8"
62
+ mysql_ver : " 5.7"
61
63
- py_ver : " 3.7"
62
64
mysql_ver : " 5.7"
63
65
steps :
64
- - uses : actions/checkout@v2
66
+ - uses : actions/checkout@v3
65
67
- name : Set up Python ${{matrix.py_ver}}
66
68
uses : actions/setup-python@v4
67
69
with :
@@ -75,15 +77,14 @@ jobs:
75
77
- name : Run primary tests
76
78
env :
77
79
PY_VER : ${{matrix.py_ver}}
80
+ DJ_PASS : simple
78
81
MYSQL_VER : ${{matrix.mysql_ver}}
79
- ALPINE_VER : " 3.10 "
82
+ DISTRO : alpine
80
83
MINIO_VER : RELEASE.2021-09-03T03-56-13Z
84
+ DOCKER_CLIENT_TIMEOUT : " 120"
81
85
COMPOSE_HTTP_TIMEOUT : " 120"
82
- COVERALLS_SERVICE_NAME : travis-ci
83
- COVERALLS_REPO_TOKEN : fd0BoXG46TPReEem0uMy7BJO5j0w1MQiY
84
86
run : |
85
87
export HOST_UID=$(id -u)
86
- export HOST_GID=$(id -g)
87
88
docker-compose -f LNX-docker-compose.yml up --build --exit-code-from app
88
89
- name : Run style tests
89
90
run : |
@@ -101,7 +102,7 @@ jobs:
101
102
DOCKER_CLIENT_TIMEOUT : " 120"
102
103
COMPOSE_HTTP_TIMEOUT : " 120"
103
104
steps :
104
- - uses : actions/checkout@v2
105
+ - uses : actions/checkout@v3
105
106
- name : Deploy docs
106
107
run : |
107
108
export MODE=BUILD
@@ -119,8 +120,8 @@ jobs:
119
120
strategy :
120
121
matrix :
121
122
include :
122
- - py_ver : 3.8
123
- distro : alpine
123
+ - py_ver : " 3.9 "
124
+ distro : debian
124
125
image : djbase
125
126
env :
126
127
PY_VER : ${{matrix.py_ver}}
@@ -133,7 +134,7 @@ jobs:
133
134
outputs :
134
135
release_upload_url : ${{steps.create_gh_release.outputs.upload_url}}
135
136
steps :
136
- - uses : actions/checkout@v2
137
+ - uses : actions/checkout@v3
137
138
- name : Set up Python ${{matrix.py_ver}}
138
139
uses : actions/setup-python@v4
139
140
with :
@@ -160,7 +161,7 @@ jobs:
160
161
prerelease : false
161
162
draft : false
162
163
- name : Fetch pip artifacts
163
- uses : actions/download-artifact@v2
164
+ uses : actions/download-artifact@v3
164
165
with :
165
166
name : pip-datajoint-${{env.DJ_VERSION}}
166
167
path : dist
@@ -192,3 +193,19 @@ jobs:
192
193
docker-compose -f docker-compose-build.yaml run \
193
194
-e TWINE_USERNAME=${TWINE_USERNAME} -e TWINE_PASSWORD=${TWINE_PASSWORD} app \
194
195
sh -lc "pip install twine && python -m twine upload dist/*"
196
+ - name : Login to DockerHub
197
+ uses : docker/login-action@v1
198
+ with :
199
+ username : ${{secrets.docker_username}}
200
+ password : ${{secrets.docker_password}}
201
+ - name : Publish image
202
+ run : |
203
+ IMAGE=$(docker images --filter "reference=datajoint/datajoint*" --format "{{.Repository}}")
204
+ TAG=$(docker images --filter "reference=datajoint/datajoint*" --format "{{.Tag}}")
205
+ docker push "${IMAGE}:${TAG}"
206
+ docker tag "${IMAGE}:${TAG}" "${IMAGE}:${TAG}-${GITHUB_SHA:0:7}"
207
+ docker push "${IMAGE}:${TAG}-${GITHUB_SHA:0:7}"
208
+ [ "$PY_VER" == "3.9" ] && [ "$DISTRO" == "debian" ] \
209
+ && docker tag "${IMAGE}:${TAG}" "${IMAGE}:latest" \
210
+ && docker push "${IMAGE}:latest" \
211
+ || echo "skipping 'latest' tag..."
0 commit comments