clean up of comments #228
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test SPRAS | |
on: [push, pull_request] | |
jobs: | |
# Installs the conda environment but does not run tests because the tests require Linux Docker images | |
conda-only: | |
name: Test conda environment | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, windows-latest] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install conda environment | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
activate-environment: spras | |
environment-file: environment.yml | |
auto-activate-base: false | |
miniconda-version: 'latest' | |
# Log conda environment contents | |
- name: Log conda environment | |
shell: bash --login {0} | |
run: conda list | |
# Runs the test code and Snakemake workflow in the conda environment | |
test: | |
name: Run test cases and workflow | |
# The Docker images will be pulled in both the docker job and this test job | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install conda environment | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
activate-environment: spras | |
environment-file: environment.yml | |
auto-activate-base: false | |
miniconda-version: 'latest' | |
# Log conda environment contents | |
- name: Log conda environment | |
shell: bash --login {0} | |
run: conda list | |
# Formerly used Singularity instead of Apptainer (see https://github.com/eWaterCycle/setup-singularity/issues/6) | |
- name: Install Apptainer | |
uses: eWaterCycle/setup-apptainer@v2 | |
with: | |
# Choose version from https://github.com/apptainer/apptainer/releases | |
apptainer-version: 1.2.2 | |
- name: Run tests | |
shell: bash --login {0} | |
# Verbose output and disable stdout and stderr capturing | |
run: pytest -vs | |
- name: Run Snakemake workflow | |
shell: bash --login {0} | |
run: snakemake --cores 2 --configfile config/config.yaml --show-failed-logs | |
# Builds the Docker images | |
docker: | |
name: Build Docker images | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [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 images | |
run: | | |
docker pull reedcompbio/omics-integrator-1:latest | |
docker pull reedcompbio/omics-integrator-2:v2 | |
docker pull reedcompbio/pathlinker:v2 | |
docker pull reedcompbio/meo:latest | |
docker pull reedcompbio/mincostflow:latest | |
docker pull reedcompbio/allpairs:v2 | |
docker pull reedcompbio/domino:latest | |
docker pull reedcompbio/py4cytoscape:v3 | |
docker pull reedcompbio/spras:v0.1.0 | |
- name: Build Omics Integrator 1 Docker image | |
uses: docker/build-push-action@v1 | |
with: | |
path: docker-wrappers/OmicsIntegrator1/. | |
dockerfile: docker-wrappers/OmicsIntegrator1/Dockerfile | |
repository: reedcompbio/omics-integrator-1 | |
tags: latest | |
cache_froms: reedcompbio/omics-integrator-1:latest | |
push: false | |
- name: Remove Omics Integrator 1 Docker image | |
# Remove the image to prevent the cache from being used. Here we use | |
# `|| true` to prevent the job from failing if the image doesn't exist or | |
# can't be removed for some reason | |
run: docker rmi reedcompbio/omics-integrator-1:latest || true | |
- name: Build Omics Integrator 2 Docker image | |
uses: docker/build-push-action@v1 | |
with: | |
path: docker-wrappers/OmicsIntegrator2/. | |
dockerfile: docker-wrappers/OmicsIntegrator2/Dockerfile | |
repository: reedcompbio/omics-integrator-2 | |
tags: v2 | |
cache_froms: reedcompbio/omics-integrator-2:latest | |
push: false | |
- name: Remove Omics Integrator 2 Docker image | |
run: docker rmi reedcompbio/omics-integrator-2:latest || true | |
- name: Build PathLinker Docker image | |
uses: docker/build-push-action@v1 | |
with: | |
path: docker-wrappers/PathLinker/. | |
dockerfile: docker-wrappers/PathLinker/Dockerfile | |
repository: reedcompbio/pathlinker | |
tags: v2 | |
cache_froms: reedcompbio/pathlinker:latest | |
push: false | |
- name: Remove PathLinker Docker image | |
run: docker rmi reedcompbio/pathlinker:latest || true | |
- name: Build Maximum Edge Orientation Docker image | |
uses: docker/build-push-action@v1 | |
with: | |
path: docker-wrappers/MEO/. | |
dockerfile: docker-wrappers/MEO/Dockerfile | |
repository: reedcompbio/meo | |
tags: latest | |
cache_froms: reedcompbio/meo:latest | |
push: false | |
- name: Remove MEO Docker image | |
run: docker rmi reedcompbio/meo:latest || true | |
- name: Build MinCostFlow Docker image | |
uses: docker/build-push-action@v1 | |
with: | |
path: docker-wrappers/MinCostFlow/. | |
dockerfile: docker-wrappers/MinCostFlow/Dockerfile | |
repository: reedcompbio/mincostflow | |
tags: latest | |
cache_froms: reedcompbio/mincostflow:latest | |
push: false | |
- name: Remove MinCostFlow Docker image | |
run: docker rmi reedcompbio/mincostflow:latest || true | |
- name: Build All Pairs Shortest Paths Docker image | |
uses: docker/build-push-action@v1 | |
with: | |
path: docker-wrappers/AllPairs/. | |
dockerfile: docker-wrappers/AllPairs/Dockerfile | |
repository: reedcompbio/allpairs | |
tags: v2 | |
cache_froms: reedcompbio/allpairs:latest | |
push: false | |
- name: Remove All Pairs Shortest Paths Docker image | |
run: docker rmi reedcompbio/allpairs:latest || true | |
- name: Build DOMINO Docker image | |
uses: docker/build-push-action@v1 | |
with: | |
path: docker-wrappers/DOMINO/. | |
dockerfile: docker-wrappers/DOMINO/Dockerfile | |
repository: reedcompbio/domino | |
tags: latest | |
cache_froms: reedcompbio/domino:latest | |
push: false | |
- name: Remove DOMINO Docker image | |
run: docker rmi reedcompbio/domino:latest || true | |
- name: Build Cytoscape Docker image | |
uses: docker/build-push-action@v1 | |
with: | |
path: docker-wrappers/Cytoscape/. | |
dockerfile: docker-wrappers/Cytoscape/Dockerfile | |
repository: reedcompbio/py4cytoscape | |
tags: v3 | |
cache_froms: reedcompbio/py4cytoscape:v3 | |
push: false | |
- name: Remove Cytoscape Docker image | |
run: docker rmi reedcompbio/py4cytoscape:v3 || true | |
- name: Build SPRAS Docker image | |
uses: docker/build-push-action@v1 | |
with: | |
path: . | |
dockerfile: docker-wrappers/SPRAS/Dockerfile | |
repository: reedcompbio/spras | |
tags: v0.2.0 | |
cache_froms: reedcompbio/spras:v0.2.0 | |
push: false | |
- name: Remove SPRAS Docker image | |
run: docker rmi reedcompbio/spras:v0.2.0 || true | |
# Run pre-commit checks on source files | |
pre-commit: | |
name: Run pre-commit checks | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' # Match this to the version specified in environment.yml | |
- name: Run pre-commit checks | |
uses: pre-commit/[email protected] |