Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Run htcondor in docker container #4

Merged
merged 2 commits into from
Mar 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 32 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,29 +66,47 @@ jobs:

testing:
runs-on: ubuntu-latest
container:
image: htcondor/mini
env:
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/submituser/.local/bin
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Python and more yum
run: |
yum install -y python${{ env.PYTHON_VERSION }}
yum install -y python${{ env.PYTHON_VERSION }}-pip
yum install -y python${{ env.PYTHON_VERSION }}-devel
yum install -y gcc

- name: HTCondor master
run: condor_master

- name: Test submit to HTCondor
run: su -c "condor_submit tests/sleep.sub" submituser

- name: Install poetry
run: pip install poetry
run: su -c "pip${{ env.PYTHON_VERSION }} install poetry" submituser

- name: Determine dependencies
run: poetry lock

- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: poetry
run: su -c "poetry lock" submituser

- name: Install dependencies
run: poetry install
run: su -c "poetry install" submituser

- name: Run pytest
run: poetry run coverage run -m pytest tests/tests.py

run: su -c "poetry run coverage run -m pytest tests/tests.py -vvv" submituser

- name: Check HTCondor logs
run: |
ls /tmp/pytest-of-submituser/pytest-0/test_simple_workflow0/simple/.snakemake/htcondor
for file in /tmp/pytest-of-submituser/pytest-0/test_simple_workflow0/simple/.snakemake/htcondor/*.log; do cat "$file"; done

- name: Check HTCondor errors
run: |
ls /tmp/pytest-of-submituser/pytest-0/test_simple_workflow0/simple/.snakemake/htcondor
for file in /tmp/pytest-of-submituser/pytest-0/test_simple_workflow0/simple/.snakemake/htcondor/*.err; do cat "$file"; done

- name: Run Coverage
run: poetry run coverage report -m
run: su -c "poetry run coverage report -m --omit=Snakefile" submituser
5 changes: 5 additions & 0 deletions tests/sleep.sub
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# sleep.sub -- simple sleep job

executable = /bin/sleep
arguments = 5s
queue
Loading