stages: - check - test - test_docker - cache_docker - test_singularity - cache_singularity # Execute this script for everybody. YAML anchor. .all-script-before: &all-script-before - pwd - env - ls -laht - whoami ### All base jobs. # Astrocyte jobs, assumed to need to run on the cluster where they have access to the module lists. .astrocyte: before_script: - *all-script-before - module load astrocyte/0.4.0 tags: - cluster_node .docker: before_script: - *all-script-before - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY ### Setup scripts before_script: - *all-script-before # This performs validation of the astrocyte_pkg.yml file astrocyte_check: extends: .astrocyte stage: check script: - astrocyte_cli check "$CI_PROJECT_DIR" nextflow_test: stage: test script: - module load nextflow/20.01.0 - module load singularity/3.5.3 - nextflow -C $CI_PROJECT_DIR/workflow/configs/biohpc.config run main.nf -with-trace -with-timeline -resume --verbose # This runs the workflow with test data and does a simple # check for the expected output file astrocyte_test: extends: .astrocyte stage: test script: - astrocyte_cli test "$CI_PROJECT_DIR" --verbose - test -s "$CI_PROJECT_DIR/workflow/output/mobydick.txt.uppercase.tolines.wordcount" # This runs the workflow, opting to use Docker containers. docker_astrocyte_test: stage: test_docker script: - echo "Run astrocyte using dockerhub/docker.io registry pulls" cache_docker_image: stage: cache_docker script: - echo "Pull Docker image from the docker.io registry, re-tag, and push to our GitLab" singularity_astrocyte_test: stage: test_singularity script: - echo "Run astrocyte using singularity registry pulls" cache_singularity_image: stage: cache_singularity script: - echo "Pull from our gitlab OCI registry using singularity and save as SIF on the cluster" # This verifies we can install the shiny vizapp dependencies # and start the vizapp running. astrocyte_shiny: stage: test script: - astrocyte_cli shiny-prepare "$CI_PROJECT_DIR" - 'timeout 10 astrocyte_cli shiny "$CI_PROJECT_DIR" &' - 'SHINY_PID=$!' - sleep 5 - unset http_proxy - unset all_proxy - wget "http://127.0.0.1:8123"