2828 DOCKER_CLIENT_TIMEOUT : " 120"
2929 COMPOSE_HTTP_TIMEOUT : " 120"
3030 steps :
31- - uses : actions/checkout@v3
31+ - uses : actions/checkout@v4
3232 - name : Validate version and release notes
3333 run : |
3434 DJ_VERSION=$(grep -oP '\d+\.\d+\.\d+' datajoint/version.py)
4242 - name : Build pip artifacts
4343 run : |
4444 export HOST_UID=$(id -u)
45- docker- compose -f docker-compose-build.yaml up --exit-code-from app --build
45+ docker compose -f docker-compose-build.yaml up --exit-code-from app --build
4646 echo "DJ_VERSION=${DJ_VERSION}" >> $GITHUB_ENV
4747 - if : matrix.py_ver == '3.9' && matrix.distro == 'debian'
4848 name : Add pip artifacts
@@ -58,14 +58,16 @@ jobs:
5858 py_ver : ["3.9"]
5959 mysql_ver : ["8.0", "5.7"]
6060 include :
61+ - py_ver : " 3.11"
62+ mysql_ver : " 8.0"
63+ - py_ver : " 3.10"
64+ mysql_ver : " 8.0"
6165 - py_ver : " 3.8"
6266 mysql_ver : " 5.7"
63- - py_ver : " 3.7"
64- mysql_ver : " 5.7"
6567 steps :
66- - uses : actions/checkout@v3
68+ - uses : actions/checkout@v4
6769 - name : Set up Python ${{matrix.py_ver}}
68- uses : actions/setup-python@v4
70+ uses : actions/setup-python@v5
6971 with :
7072 python-version : ${{matrix.py_ver}}
7173 - name : Install dependencies
@@ -77,30 +79,46 @@ jobs:
7779 - name : Run primary tests
7880 env :
7981 PY_VER : ${{matrix.py_ver}}
80- DJ_PASS : simple
82+ DJ_PASS : password
8183 MYSQL_VER : ${{matrix.mysql_ver}}
8284 DISTRO : alpine
8385 MINIO_VER : RELEASE.2021-09-03T03-56-13Z
8486 DOCKER_CLIENT_TIMEOUT : " 120"
8587 COMPOSE_HTTP_TIMEOUT : " 120"
8688 run : |
8789 export HOST_UID=$(id -u)
88- docker-compose -f LNX-docker-compose.yml up --build --exit-code-from app
90+ docker compose -f LNX-docker-compose.yml up --build --exit-code-from app
91+ lint :
92+ runs-on : ubuntu-latest
93+ strategy :
94+ matrix :
95+ py_ver : ["3.11"]
96+ steps :
97+ - uses : actions/checkout@v4
98+ - name : Set up Python ${{matrix.py_ver}}
99+ uses : actions/setup-python@v5
100+ with :
101+ python-version : ${{matrix.py_ver}}
102+ - name : Install dependencies
103+ run : |
104+ python -m pip install --upgrade pip
105+ pip install flake8 black==24.2.0
106+ - name : Run syntax tests
107+ run : flake8 datajoint --count --select=E9,F63,F7,F82 --show-source --statistics
89108 - name : Run style tests
90109 run : |
91110 flake8 --ignore=E203,E722,W503 datajoint \
92- --count --max-complexity=62 --max-line-length=127 --statistics
93- black datajoint --check -v
94- black tests --check -v
95- black tests_old --check -v
111+ --count --max-complexity=62 --max-line-length=127 --statistics \
112+ --per-file-ignores='datajoint/diagram.py:C901'
113+ black --required-version '24.2.0' --check -v datajoint tests tests_old
96114 codespell :
97115 name : Check for spelling errors
98116 permissions :
99117 contents : read
100118 runs-on : ubuntu-latest
101119 steps :
102120 - name : Checkout
103- uses : actions/checkout@v3
121+ uses : actions/checkout@v4
104122 - name : Codespell
105123 uses : codespell-project/actions-codespell@v2
106124 publish-docs :
@@ -113,7 +131,7 @@ jobs:
113131 DOCKER_CLIENT_TIMEOUT : " 120"
114132 COMPOSE_HTTP_TIMEOUT : " 120"
115133 steps :
116- - uses : actions/checkout@v3
134+ - uses : actions/checkout@v4
117135 - name : Deploy docs
118136 run : |
119137 export MODE=BUILD
@@ -145,9 +163,9 @@ jobs:
145163 outputs :
146164 release_upload_url : ${{steps.create_gh_release.outputs.upload_url}}
147165 steps :
148- - uses : actions/checkout@v3
166+ - uses : actions/checkout@v4
149167 - name : Set up Python ${{matrix.py_ver}}
150- uses : actions/setup-python@v4
168+ uses : actions/setup-python@v5
151169 with :
152170 python-version : ${{matrix.py_ver}}
153171 - name : Determine package version
@@ -172,7 +190,7 @@ jobs:
172190 prerelease : false
173191 draft : false
174192 - name : Fetch pip artifacts
175- uses : actions/download-artifact@v3
193+ uses : actions/download-artifact@v4.1.7
176194 with :
177195 name : pip-datajoint-${{env.DJ_VERSION}}
178196 path : dist
@@ -201,7 +219,7 @@ jobs:
201219 - name : Publish pip release
202220 run : |
203221 export HOST_UID=$(id -u)
204- docker- compose -f docker-compose-build.yaml run \
222+ docker compose -f docker-compose-build.yaml run \
205223 -e TWINE_USERNAME=${TWINE_USERNAME} -e TWINE_PASSWORD=${TWINE_PASSWORD} app \
206224 sh -c "pip install twine && python -m twine upload dist/*"
207225 - name : Login to DockerHub
0 commit comments