Skip to content

Commit

Permalink
Merge pull request #94 from CCBR/ci-dryrun
Browse files Browse the repository at this point in the history
Test a dryrun with GitHub Actions
  • Loading branch information
slsevilla authored Jan 11, 2024
2 parents 821c018 + 82fd7cd commit ed99b44
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 14 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/lintr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
branches:
- master
- dev
pull_request:
branches:
- master
- dev

jobs:
Lintr:
runs-on: ubuntu-latest
Expand All @@ -22,4 +27,4 @@ jobs:
touch hg38.fa genes.gtf hg38.bed hg38.tss.bed hg38_refseq.ucsc Ecoli_GCF_000005845.2_ASM584v2_genomic.fna adapters.fa && \
snakemake --lint -s /opt2/workflow/Snakefile \
-d /opt2/output_carlisle --configfile /opt2/.test/config_lint.yaml || \
echo 'There may have been a few warnings or errors. Please read through the log to determine if its harmless.'"
echo 'There may have been a few warnings or errors. Please read through the log to determine if its harmless.'"
33 changes: 20 additions & 13 deletions .github/workflows/test_dev.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,32 @@
name: DevTesting
name: test
on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.0
- uses: docker://snakemake/snakemake:v7.19.1
with:
directory: '.test'
- name: Dev Testing Workflow
continue-on-error: true
- name: dryrun
shell: bash {0}
run: |
docker run -v $PWD:/opt2 snakemake/snakemake:v7.19.1 /bin/bash -c \
"mkdir -p /opt2/output_carlisle/config /opt2/output_carlisle/annotation && \
cp -r /opt2/workflow/scripts/ /opt2/output_carlisle/ && \
cp /opt2/resources/cluster_biowulf.yaml /opt2/output_carlisle/config/cluster.yaml && \
cp /opt2/resources/tools_biowulf.yaml /opt2/output_carlisle/config/tools.yaml && \
cd /opt2/output_carlisle/annotation && \
touch hg38.fa genes.gtf hg38.bed hg38.tss.bed hg38_refseq.ucsc Ecoli_GCF_000005845.2_ASM584v2_genomic.fna adapters.fa && \
snakemake --lint -s /opt2/workflow/Snakefile \
-d /opt2/output_carlisle --configfile /opt2/.test/config_lint.yaml || \
echo 'There may have been a few warnings or errors. Please read through the log to determine if its harmless.'"
bash ./install.sh ./test-workdir/carlisle-v9999.9999.9999-dev
./test-workdir/carlisle-v9999.9999.9999-dev/bin/carlisle --runmode=init --workdir=./test-workdir/output_carlisle
cp ./test-workdir/carlisle-v9999.9999.9999-dev/bin/.test/config_lint.yaml ./test-workdir/output_carlisle/config/config.yaml
# TODO: use `carlisle run --mode dryrun`
docker run -v ./test-workdir/:/opt2 snakemake/snakemake:v7.19.1 /bin/bash -c \
"cd /opt2 && snakemake \
-s ./carlisle-v9999.9999.9999-dev/bin/workflow/Snakefile \
--dryrun \
--configfile carlisle-v9999.9999.9999-dev/bin/.test/config_lint.yaml \
--directory output_carlisle"

0 comments on commit ed99b44

Please sign in to comment.