Skip to content

Commit bc084dc

Browse files
authored
CI: setup uv (#450)
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
1 parent 44c5bdf commit bc084dc

File tree

7 files changed

+17
-11
lines changed

7 files changed

+17
-11
lines changed

.github/workflows/pyright.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ jobs:
1111
- uses: actions/setup-python@v5
1212
with:
1313
python-version: '3.11'
14-
- run: pip install -e .[cloudserver,gui]
14+
- run: pip install uv
15+
- run: uv pip install --system -e .[cloudserver,gui]
1516
- uses: jakebailey/pyright-action@v2
1617
with:
1718
version: 1.1.308

.github/workflows/test-bohrium.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ jobs:
2020
with:
2121
python-version: '3.12'
2222
cache: 'pip'
23-
- run: pip install .[bohrium] coverage
23+
- run: pip install uv
24+
- run: uv pip install --system .[bohrium] coverage
2425
- name: Test
2526
run: coverage run --source=./dpdispatcher -m unittest -v tests/test_run_submission_bohrium.py && coverage report
2627
env:

.github/workflows/test.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,17 @@ jobs:
3131
uses: actions/setup-python@v5
3232
with:
3333
python-version: ${{ matrix.python-version }}
34-
- run: pip install .[test] coverage
34+
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
35+
if: matrix.platform != 'windows-latest'
36+
- run: powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
37+
if: matrix.platform == 'windows-latest'
38+
- run: uv pip install --system .[test] coverage
3539
- name: Test
3640
run: |
37-
coverage run -p --source=./dpdispatcher -m unittest -v
38-
coverage run -p --source=./dpdispatcher -m dpdispatcher -h
39-
coverage combine
40-
coverage report
41+
python -m coverage run -p --source=./dpdispatcher -m unittest -v
42+
python -m coverage run -p --source=./dpdispatcher -m dpdispatcher -h
43+
python -m coverage combine
44+
python -m coverage report
4145
- uses: codecov/codecov-action@v4
4246
env:
4347
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

ci/pbs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ cd -
99
docker exec pbs_master /bin/bash -c "chmod -R 777 /shared_space"
1010
docker exec pbs_master /bin/bash -c "chown -R pbsuser:pbsuser /home/pbsuser"
1111

12-
docker exec pbs_master /bin/bash -c "cd /dpdispatcher && pip install .[test] coverage && chown -R pbsuser ."
12+
docker exec pbs_master /bin/bash -c "cd /dpdispatcher && pip install uv && uv pip install --system .[test] coverage && chown -R pbsuser ."
1313
docker exec -u pbsuser pbs_master /bin/bash -c "cd /dpdispatcher && coverage run --source=./dpdispatcher -m unittest -v && coverage report"
1414
docker exec -u pbsuser --env-file <(env | grep GITHUB) pbs_master /bin/bash -c "cd /dpdispatcher && curl -Os https://uploader.codecov.io/latest/linux/codecov && chmod +x codecov && ./codecov"

ci/slurm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ docker-compose pull
66
./start-slurm.sh
77
cd -
88

9-
docker exec slurmctld /bin/bash -c "cd dpdispatcher && pip install .[test] coverage && coverage run --source=./dpdispatcher -m unittest -v && coverage report"
9+
docker exec slurmctld /bin/bash -c "cd dpdispatcher && pip install uv && uv pip install --system .[test] coverage && coverage run --source=./dpdispatcher -m unittest -v && coverage report"
1010
docker exec --env-file <(env | grep -e GITHUB -e CODECOV) slurmctld /bin/bash -c "cd dpdispatcher && curl -Os https://uploader.codecov.io/latest/linux/codecov && chmod +x codecov && ./codecov"

ci/ssh.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ docker-compose pull
66
./start-ssh.sh
77
cd -
88

9-
docker exec test /bin/bash -c "cd /dpdispatcher && pip install .[test] coverage && coverage run --source=./dpdispatcher -m unittest -v && coverage report"
9+
docker exec test /bin/bash -c "cd /dpdispatcher && pip install uv && uv pip install --system .[test] coverage && coverage run --source=./dpdispatcher -m unittest -v && coverage report"
1010
docker exec --env-file <(env | grep -e GITHUB -e CODECOV) test /bin/bash -c "cd /dpdispatcher && curl -Os https://uploader.codecov.io/latest/linux/codecov && chmod +x codecov && ./codecov"

ci/ssh_rsync.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ cd -
1010
docker exec server /bin/bash -c "apt-get -y update && apt-get -y install rsync"
1111
docker exec test /bin/bash -c "apt-get -y update && apt-get -y install rsync"
1212

13-
docker exec test /bin/bash -c "cd /dpdispatcher && pip install .[test] coverage && coverage run --source=./dpdispatcher -m unittest -v && coverage report"
13+
docker exec test /bin/bash -c "cd /dpdispatcher && pip install uv && uv pip install --system .[test] coverage && coverage run --source=./dpdispatcher -m unittest -v && coverage report"
1414
docker exec --env-file <(env | grep -e GITHUB -e CODECOV) test /bin/bash -c "cd /dpdispatcher && curl -Os https://uploader.codecov.io/latest/linux/codecov && chmod +x codecov && ./codecov"

0 commit comments

Comments
 (0)