Skip to content

Commit

Permalink
test flux workflow
Browse files Browse the repository at this point in the history
this might take me a few tries :)

Signed-off-by: vsoch <vsoch@users.noreply.github.com>
  • Loading branch information
vsoch committed Aug 19, 2022
1 parent 1145d27 commit 15317ab
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 11 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/test-flux.yaml
@@ -0,0 +1,42 @@
name: Test Flux Executor
on:
pull_request: []

jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: read
strategy:
fail-fast: false
matrix:
container: ['fluxrm/flux-sched:focal']

container:
image: ${{ matrix.container }}
options: "--platform=linux/amd64"

name: ${{ matrix.container }}
steps:
- name: Make Space
run: |
rm -rf /usr/share/dotnet
rm -rf /opt/ghc
- name: Checkout
uses: actions/checkout@v3

- name: Install Snakemake
run: |
# We are fluxuser in the container (added to sudo)
sudo wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh
sudo /bin/bash ~/miniconda.sh -b -p /opt/conda
export PATH=/opt/conda:/bin:$PATH
# Install snakemake
pip install .
- name: Start Flux and Test Workflow
run: |
cd examples/flux
flux start --test-size=4
snakemake --flux --jobs=1
12 changes: 1 addition & 11 deletions snakemake/executors/flux.py
Expand Up @@ -130,17 +130,7 @@ def _get_jobname(self, job):
return "snakejob-%s-%s-%s" % (self.run_namespace, job.name, job.jobid)

def _generate_environment(self):
"""
Loop through envvars (keys to host environment) and add
any that are requested for the runtime environment
"""
envvars = dict(os.environ)
for key in self.envvars:
try:
envvars[key] = os.environ[key]
except Exception:
continue
return envvars
return {os.environ[key] for key in self.envvars}

def format_job_exec(self, job):
"""
Expand Down

0 comments on commit 15317ab

Please sign in to comment.