Skip to content

Commit 7768497

Browse files
committed
Many changes to CI/CD
1 parent 04b9048 commit 7768497

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

.github/workflows/development.yaml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,13 @@ jobs:
2929
COMPOSE_HTTP_TIMEOUT: "120"
3030
steps:
3131
- uses: actions/checkout@v4
32+
- uses: actions/setup-python@v5
33+
with:
34+
python-version: ${{matrix.py_ver}}
3235
- name: Validate version and release notes
3336
run: |
3437
DJ_VERSION=$(grep -oP '\d+\.\d+\.\d+' datajoint/version.py)
35-
RELEASE_BODY=$(python -c \
38+
RELEASE_BODY=$(python3 -c \
3639
'print(open("./CHANGELOG.md").read().split("\n\n")[1].split("\n", 1)[1])' \
3740
)
3841
echo "DJ_VERSION=${DJ_VERSION}" >> $GITHUB_ENV
@@ -41,8 +44,7 @@ jobs:
4144
echo "EOF" >> $GITHUB_ENV
4245
- name: Build pip artifacts
4346
run: |
44-
export HOST_UID=$(id -u)
45-
docker compose -f docker-compose-build.yaml up --exit-code-from app --build
47+
python3 setup.py bdist_wheel sdist
4648
echo "DJ_VERSION=${DJ_VERSION}" >> $GITHUB_ENV
4749
- if: matrix.py_ver == '3.9' && matrix.distro == 'debian'
4850
name: Add pip artifacts
@@ -72,8 +74,8 @@ jobs:
7274
python-version: ${{matrix.py_ver}}
7375
- name: Install dependencies
7476
run: |
75-
python -m pip install --upgrade pip
76-
pip install flake8 black
77+
python3 -m pip install --upgrade pip
78+
python3 -m pip install ".[test]"
7779
- name: Run syntax tests
7880
run: flake8 datajoint --count --select=E9,F63,F7,F82 --show-source --statistics
7981
- name: Run primary tests
@@ -87,7 +89,7 @@ jobs:
8789
COMPOSE_HTTP_TIMEOUT: "120"
8890
run: |
8991
export HOST_UID=$(id -u)
90-
docker compose up --build --exit-code-from app
92+
docker compose --profile test up --build --exit-code-from djtest djtest
9193
lint:
9294
runs-on: ubuntu-latest
9395
strategy:
@@ -101,8 +103,8 @@ jobs:
101103
python-version: ${{matrix.py_ver}}
102104
- name: Install dependencies
103105
run: |
104-
python -m pip install --upgrade pip
105-
pip install flake8 black==24.2.0
106+
python3 -m pip install --upgrade pip
107+
python3 -m pip install ".[test]"
106108
- name: Run syntax tests
107109
run: flake8 datajoint --count --select=E9,F63,F7,F82 --show-source --statistics
108110
- name: Run style tests
@@ -219,7 +221,7 @@ jobs:
219221
- name: Publish pip release
220222
run: |
221223
export HOST_UID=$(id -u)
222-
docker compose -f docker-compose-build.yaml run \
224+
docker compose run \
223225
-e TWINE_USERNAME=${TWINE_USERNAME} -e TWINE_PASSWORD=${TWINE_PASSWORD} app \
224226
sh -c "pip install twine && python -m twine upload dist/*"
225227
- name: Login to DockerHub

0 commit comments

Comments
 (0)