Skip to content

Commit 2c433fd

Browse files
Update GHA.
1 parent 3d0ceaa commit 2c433fd

7 files changed

Lines changed: 31 additions & 30 deletions

File tree

.github/workflows/development.yaml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
DOCKER_CLIENT_TIMEOUT: "120"
2929
COMPOSE_HTTP_TIMEOUT: "120"
3030
steps:
31-
- uses: actions/checkout@v2
31+
- uses: actions/checkout@v3
3232
- name: Validate version and release notes
3333
run: |
3434
DJ_VERSION=$(grep -oP '\d+\.\d+\.\d+' datajoint/version.py)
@@ -46,7 +46,7 @@ jobs:
4646
echo "DJ_VERSION=${DJ_VERSION}" >> $GITHUB_ENV
4747
- if: matrix.py_ver == '3.8' && matrix.distro == 'alpine'
4848
name: Add pip artifacts
49-
uses: actions/upload-artifact@v2
49+
uses: actions/upload-artifact@v3
5050
with:
5151
name: pip-datajoint-${{env.DJ_VERSION}}
5252
path: dist
@@ -55,18 +55,19 @@ jobs:
5555
runs-on: ubuntu-latest
5656
strategy:
5757
matrix:
58-
# py_ver: ["3.10"]
59-
py_ver: ["3.9"]
58+
py_ver: ["3.11"]
6059
mysql_ver: ["8.0", "5.7"]
6160
include:
62-
# - py_ver: "3.9"
63-
# mysql_ver: "5.7"
61+
- py_ver: "3.10"
62+
mysql_ver: "5.7"
63+
- py_ver: "3.9"
64+
mysql_ver: "5.7"
6465
- py_ver: "3.8"
6566
mysql_ver: "5.7"
6667
- py_ver: "3.7"
6768
mysql_ver: "5.7"
6869
steps:
69-
- uses: actions/checkout@v2
70+
- uses: actions/checkout@v3
7071
- name: Set up Python ${{matrix.py_ver}}
7172
uses: actions/setup-python@v4
7273
with:
@@ -83,6 +84,7 @@ jobs:
8384
MYSQL_VER: ${{matrix.mysql_ver}}
8485
DISTRO: alpine
8586
MINIO_VER: RELEASE.2021-09-03T03-56-13Z
87+
DOCKER_CLIENT_TIMEOUT: "120"
8688
COMPOSE_HTTP_TIMEOUT: "120"
8789
run: |
8890
export HOST_UID=$(id -u)
@@ -103,7 +105,7 @@ jobs:
103105
DOCKER_CLIENT_TIMEOUT: "120"
104106
COMPOSE_HTTP_TIMEOUT: "120"
105107
steps:
106-
- uses: actions/checkout@v2
108+
- uses: actions/checkout@v3
107109
- name: Deploy docs
108110
run: |
109111
export MODE=BUILD
@@ -135,7 +137,7 @@ jobs:
135137
outputs:
136138
release_upload_url: ${{steps.create_gh_release.outputs.upload_url}}
137139
steps:
138-
- uses: actions/checkout@v2
140+
- uses: actions/checkout@v3
139141
- name: Set up Python ${{matrix.py_ver}}
140142
uses: actions/setup-python@v4
141143
with:
@@ -162,7 +164,7 @@ jobs:
162164
prerelease: false
163165
draft: false
164166
- name: Fetch pip artifacts
165-
uses: actions/download-artifact@v2
167+
uses: actions/download-artifact@v3
166168
with:
167169
name: pip-datajoint-${{env.DJ_VERSION}}
168170
path: dist

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ notebook
2424
.vscode
2525
__main__.py
2626
jupyter_custom.js
27-
apk_requirements.txt
2827
.eggs
2928
*.code-workspace
3029
docs/site

Dockerfile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
FROM datajoint/djbase
2-
3-
COPY --chown=anaconda:anaconda . /tmp/src
4-
RUN pip install --no-cache-dir /tmp/src && \
5-
rm -rf /tmp/src
1+
ARG IMAGE
2+
ARG PY_VER
3+
ARG DISTRO
4+
FROM datajoint/${IMAGE}:py${PY_VER}-${DISTRO}
5+
COPY --chown=anaconda:anaconda ./setup.py ./datajoint.pub ./requirements.txt /main/
6+
COPY --chown=anaconda:anaconda ./datajoint /main/datajoint
7+
RUN \
8+
pip install --no-cache-dir /main && \
9+
rm -r /main/*

LNX-docker-compose.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# docker compose -f LNX-docker-compose.yml --env-file LNX.env up --exit-code-from app --build
2-
version: '2.2'
2+
version: '2.4'
33
x-net: &net
44
networks:
55
- main
66
services:
77
db:
88
<<: *net
9-
image: datajoint/mysql:$MYSQL_VER
9+
image: datajoint/mysql:${MYSQL_VER}
1010
environment:
1111
- MYSQL_ROOT_PASSWORD=simple
1212
# ports:
@@ -15,7 +15,7 @@ services:
1515
# - ./mysql/data:/var/lib/mysql
1616
minio:
1717
<<: *net
18-
image: minio/minio:$MINIO_VER
18+
image: minio/minio:${MINIO_VER}
1919
environment:
2020
- MINIO_ACCESS_KEY=datajoint
2121
- MINIO_SECRET_KEY=datajoint
@@ -77,9 +77,8 @@ services:
7777
set -e
7878
pip install --user nose nose-cov
7979
pip install -e .
80-
pip freeze | grep datajoint
80+
pip list --format=freeze | grep datajoint
8181
nosetests -vsw tests --with-coverage --cover-package=datajoint
82-
# jupyter notebook
8382
# ports:
8483
# - "8888:8888"
8584
user: ${HOST_UID}:anaconda

apk_requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

docker-compose-build.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# PY_VER=3.8 IMAGE=djbase DISTRO=alpine DJ_VERSION=$(grep -oP '\d+\.\d+\.\d+' datajoint/version.py) HOST_UID=$(id -u) docker compose -f docker-compose-build.yaml up --exit-code-from app --build
1+
# PY_VER=3.10 IMAGE=djbase DISTRO=debian DJ_VERSION=$(grep -oP '\d+\.\d+\.\d+' datajoint/version.py) HOST_UID=$(id -u) docker compose -f docker-compose-build.yaml up --exit-code-from app --build
22
#
33
# Intended for updating dependencies and docker image.
44
# Used to build release artifacts.
@@ -17,7 +17,7 @@ services:
1717
- .:/main
1818
command:
1919
- sh
20-
- -lc
20+
- -c
2121
- |
2222
set -e
2323
rm -R build dist *.egg-info || echo "No prev build"

local-docker-compose.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# docker compose -f local-docker-compose.yml --env-file LNX.env up --build
2-
version: '2.2'
2+
version: '2.4'
33
x-net: &net
44
networks:
55
- main
66
services:
77
db:
88
<<: *net
9-
image: datajoint/mysql:$MYSQL_VER
9+
image: datajoint/mysql:${MYSQL_VER}
1010
environment:
1111
- MYSQL_ROOT_PASSWORD=simple
1212
# ports:
@@ -16,7 +16,7 @@ services:
1616
# - ./mysql/data:/var/lib/mysql
1717
minio:
1818
<<: *net
19-
image: minio/minio:$MINIO_VER
19+
image: minio/minio:${MINIO_VER}
2020
environment:
2121
- MINIO_ACCESS_KEY=datajoint
2222
- MINIO_SECRET_KEY=datajoint
@@ -84,16 +84,14 @@ services:
8484
set -e
8585
pip install --user nose nose-cov
8686
pip install -e .
87-
pip freeze | grep datajoint
87+
pip list --format=freeze | grep datajoint
8888
## You may run the below tests once sh'ed into container i.e. docker exec -it datajoint-python_app_1 sh
8989
# nosetests -vsw tests; #run all tests
9090
# nosetests -vs --tests=tests.test_external_class:test_insert_and_fetch; #run specific basic test
9191
# nosetests -vs --tests=tests.test_fetch:TestFetch.test_getattribute_for_fetch1; #run specific Class test
9292
# flake8 datajoint --count --select=E9,F63,F7,F82 --show-source --statistics
9393
# flake8 --ignore=E203,E722,W503 datajoint --count --max-complexity=62 --max-line-length=127 --statistics
9494
# black datajoint --check -v
95-
## Interactive Jupyter Notebook environment
96-
jupyter notebook &
9795
## Remote debugger
9896
set +e
9997
while true

0 commit comments

Comments
 (0)