Skip to content

Commit 0f9d2b0

Browse files
committed
flux workflow
1 parent 4ad2996 commit 0f9d2b0

File tree

1 file changed

+31
-34
lines changed

1 file changed

+31
-34
lines changed

.github/workflows/testflux.yml

Lines changed: 31 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -9,38 +9,35 @@ on:
99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
12-
12+
permissions:
13+
packages: read
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
container: ['fluxrm/flux-sched:focal-v0.28.0']
18+
19+
container:
20+
image: ${{ matrix.container }}
21+
options: "--platform=linux/amd64 --user root -it --init"
22+
23+
name: ${{ matrix.container }}
1324
steps:
14-
- name: Checkout code
15-
uses: actions/checkout@v4
16-
17-
- name: Start Docker container
18-
run: |
19-
docker run -itd --name flux -v `pwd`:/pydra fluxrm/flux-sched:focal-v0.28.0 flux start
20-
sleep 5 # Give the container some time to start
21-
22-
- name: Run necessary changes in container
23-
run: |
24-
# Install Python 3 (if not already installed)
25-
docker exec flux apt-get update
26-
docker exec flux apt-get install -y python3
27-
28-
# Add Python to PATH
29-
docker exec flux echo 'export PATH="/home/fluxuser/.local/bin:$PATH"' >> ~/.bashrc
30-
31-
# Create an alias for 'python' (pointing to 'python3')
32-
docker exec flux echo 'alias python=python3' >> ~/.bashrc
33-
34-
# Source the updated .bashrc to apply changes
35-
docker exec flux source ~/.bashrc
36-
37-
- name: Run pytest
38-
run: |
39-
docker exec flux bash -c "pytest --psij=flux --color=yes -vs -n auto --psij=slurm --cov pydra --cov-config /pydra/.coveragerc --cov-report xml:/pydra/cov.xml --doctest-modules /pydra/pydra/"
40-
41-
- name: Upload to codecov
42-
run: |
43-
docker exec flux bash -c "codecov --root /pydra -f /pydra/cov.xml -F unittests"
44-
45-
- name: Stop and remove Docker container
46-
run: docker stop flux && docker rm flux
25+
- name: Make Space
26+
run: |
27+
rm -rf /usr/share/dotnet
28+
rm -rf /opt/ghc
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
32+
- name: Install
33+
run: |
34+
apt-get update && apt-get install -y python3-venv
35+
export PATH=$PWD/bin:$PATH
36+
ln -s /usr/bin/python3 /usr/bin/python
37+
python3 -m pip install --upgrade pip && pip install -e ".[test]" && python -c 'import pydra; print(pydra.__version__)'
38+
pip install -e "git+https://github.com/adi611/psij-python.git@adi611-patch-2#egg=psij-python"
39+
- name: Start Flux and Run Test
40+
run: |
41+
export PATH=$PWD/bin:$PATH
42+
flux start python -V
43+
flux start pytest --psij=flux --color=yes -vs --cov pydra --cov-config .coveragerc --cov-report xml:cov.xml --doctest-modules pydra/

0 commit comments

Comments
 (0)