Skip to content

Commit

Permalink
Add test container task
Browse files Browse the repository at this point in the history
  • Loading branch information
andersgs committed Jun 4, 2020
1 parent 8a77cfb commit 507ca2d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,26 @@

from invoke import task


@task
def clean(c):
print("Removing container")
c.sudo("rm -rf salmonella_typing.simg")


@task(clean)
def build_container(c):
print("Building container")
c.sudo('singularity build salmonella_typing.simg Singularity')
c.sudo('singularity build -T salmonella_typing.simg Singularity')


@task(build_container)
def test_container(c):
print("Testing container...")
c('singularity test salmonella_typing.simg')


@task(build_container)
def run_validation(c):
print("Generating validation data")
c.run("./salmonella_typing.simg validate")
c.run("./salmonella_typing.simg validate")

0 comments on commit 507ca2d

Please sign in to comment.