Skip to content

Link to DockerHub tags in readme #66

Link to DockerHub tags in readme

Link to DockerHub tags in readme #66

Workflow file for this run

name: Install test SINGE
on: [push, pull_request]
jobs:
# Builds and tests the SINGE Docker image, tests SINGE in a Docker container
docker:
name: Install test Docker
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
# Pull from Docker Hub to use the cache
# https://medium.com/mobileforgood/coding-tips-patterns-for-continuous-integration-with-docker-on-travis-ci-9cedb8348a62
# https://github.com/docker/build-push-action/issues/7
- name: Pull Docker image
run: docker pull agitter/singe:tmp
- name: Build Docker image
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
path: .
dockerfile: docker/Dockerfile
repository: agitter/singe
tags: tmp
cache_froms: agitter/singe:tmp
add_git_labels: true
# Only push when running on the master branch
push: ${{ github.ref == 'refs/heads/master' }}
- name: Test SINGE
run: |
# Store the md5sums of the tracked source files before running tests in the Docker image
# The Docker image does not have git installed
md5sum $(git ls-tree -r HEAD --name-only | grep '.*\.m$') > current_code.md5
# Run SINGE tests in the built Docker image
# The conda environment should be activated before running the bash script
# See https://github.com/conda/conda/issues/7980
docker run -v $(pwd):/SINGE -w /SINGE --entrypoint "/bin/bash" agitter/singe:tmp -c "source ~/.bashrc; conda activate singe-test; tests/docker_test.sh"
# Proof-of-concept of running SINGE in a high-throughput style
# Can be moved to run in a parallel job
bash tests/high_throughput_test.sh
# Test standalone SINGE run through Docker
bash tests/standalone_test.sh
# Test standalone SINGE on a branching dataset
bash tests/standalone_branching_test.sh
# Test standalone SINGE on a dataset with regulator indices
bash tests/standalone_regix_test.sh
# Confirm the hyperparameter generation script works
cd scripts
bash generate_hyperparameters.sh
# Installs MATLAB runtime R2020a and tests compiled SINGE for macOS on test data
macos:
name: Install test macOS
# See available macOS software https://github.com/actions/virtual-environments/blob/master/images/macos/macos-10.15-Readme.md
runs-on: macos-latest
env:
SINGE_VERSION: v0.5.1
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install conda environment
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: singe-test
environment-file: tests/environment.yml
auto-activate-base: false
miniconda-version: 'latest'
- name: Cache MATLAB runtime installer
id: cache-installer
uses: actions/cache@v1
with:
path: installer
key: ${{ runner.os }}-matlab-R2020a-installer
- name: Download MATLAB runtime installer
if: steps.cache-installer.outputs.cache-hit != 'true'
run: wget --quiet --directory-prefix=installer http://ssd.mathworks.com/supportfiles/downloads/R2020a/Release/2/deployment_files/installer/complete/maci64/MATLAB_Runtime_R2020a_Update_2_maci64.dmg.zip
- name: Install MATLAB runtime
run: |
unzip -d . -q installer/MATLAB_Runtime_R2020a_Update_2_maci64.dmg.zip
hdiutil mount MATLAB_Runtime_R2020a_Update_2_maci64.dmg
cp -R /Volumes/MATLAB_Runtime_R2020a_Update_2_maci64 .
hdiutil unmount /Volumes/MATLAB_Runtime_R2020a_Update_2_maci64
sudo ./MATLAB_Runtime_R2020a_Update_2_maci64/InstallForMacOSX.app/Contents/MacOS/InstallForMacOSX -mode silent -agreeToLicense yes
MATLAB_RUNTIME_PATH=/Applications/MATLAB/MATLAB_Runtime/v98
echo "MATLAB_RUNTIME_PATH=$MATLAB_RUNTIME_PATH" >> $GITHUB_ENV
echo "DYLD_LIBRARY_PATH=$MATLAB_RUNTIME_PATH/runtime/maci64:$MATLAB_RUNTIME_PATH/sys/os/maci64:$MATLAB_RUNTIME_PATH/bin/maci64" >> $GITHUB_ENV
echo "$MATLAB_RUNTIME_PATH/bin/maci64" >> $GITHUB_PATH
- name: Download SINGE
run: |
wget --quiet https://github.com/gitter-lab/SINGE/releases/download/$SINGE_VERSION/SINGE_mac.tgz
tar -xf SINGE_mac.tgz
- name: Run and test SINGE
shell: bash -l {0}
run: |
bash SINGE.sh $MATLAB_RUNTIME_PATH standalone data1/X_SCODE_data.mat data1/gene_list.mat Output tests/example_hyperparameters.txt
ls -l Output
bash tests/compare_example_output.sh Output tests/reference/latest 1e-02 1e-02