Skip to content

Commit

Permalink
fix action
Browse files Browse the repository at this point in the history
  • Loading branch information
nebfield committed Jul 19, 2023
1 parent 0bb5854 commit 211c962
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
32 changes: 18 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ jobs:
run: |
nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.test_profile}},${{ matrix.profile }}
# run ancestry separately because it needs reference data
# run ancestry separately because it needs reference data
ancestry_test:
needs: [preload_docker, preload_singularity]
name: ${{ matrix.profile }} ${{ matrix.tags }}
Expand All @@ -159,28 +159,32 @@ jobs:
profile: ["docker", "singularity"]
tags:
- "ancestry"
env:
ANCESTRY_REF_DIR: {{ env.runner_temp }}
ANCESTRY_TARGET_DIR: {{ env.runner_temp }}


steps:
- name: Set Environment Variable
run: |
echo "ANCESTRY_REF_DIR=$RUNNER_TEMP" >> $GITHUB_ENV
echo "ANCESTRY_TARGET_DIR=$RUNNER_TEMP" >> $GITHUB_ENV
- name: Cache reference data
id: cache-ref
uses: actions/cache@v3
with:
path: |
$ANCESTRY_TARGET_DIR/GRCh38_HAPNEST_TARGET_ALL.pgen
$ANCESTRY_TARGET_DIR/GRCh38_HAPNEST_TARGET_ALL.psam
$ANCESTRY_TARGET_DIR/GRCh38_HAPNEST_TARGET_ALL.pvar.zst
$ANCESTRY_REF_DIR/GRCh38_HAPNEST_reference.tar.zst
$ANCESTRY_TARGET_DIR/GRCh38_HAPNEST_TARGET_ALL.pvar.zst
$ANCESTRY_REF_DIR/GRCh38_HAPNEST_reference.tar.zst
key: ${{ runner.os }}-ancestry

- name: Download reference data
if: steps.cache-ref.outputs.cache-hit != 'true'
if: steps.cache-ref.outputs.cache-hit != 'true'
run: |
wget -nc -P $ANCESTRY_REF_DIR https://ftp.ebi.ac.uk/pub/databases/spot/pgs/resources/GRCh38_HAPNEST_reference.tar.zst
wget -nc -O $TMPDIR/temp.zstd https://ftp.ebi.ac.uk/pub/databases/spot/pgs/resources/GRCh38_HAPNEST_target.tar.zst
tar -xf $TMPDIR/temp.zstd -C $ANCESTRY_TARGET_DIR
wget -qnc -P $ANCESTRY_REF_DIR https://ftp.ebi.ac.uk/pub/databases/spot/pgs/resources/GRCh38_HAPNEST_reference.tar.zst
wget -qnc -P $ANCESTRY_TARGET_DIR https://ftp.ebi.ac.uk/pub/databases/spot/pgs/resources/GRCh38_HAPNEST_target.tar.zst
tar -xf $ANCESTRY_TARGET_DIR/GRCh38_HAPNEST_target.tar.zst -C $ANCESTRY_TARGET_DIR
- name: Check out pipeline code
uses: actions/checkout@v3

Expand Down Expand Up @@ -250,8 +254,8 @@ jobs:
/home/runner/pytest_workflow_*/*/work
!/home/runner/pytest_workflow_*/*/work/conda
!/home/runner/pytest_workflow_*/*/work/singularity
unit_test:
needs: [preload_docker, preload_singularity]
name: ${{ matrix.profile }} ${{ matrix.tags }}
Expand Down
2 changes: 1 addition & 1 deletion tests/ancestry/samplesheet.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
sampleset,path_prefix,chrom,format
hapnest,ANCESTRY_TARGET_DIR/GRCh38_HAPNEST_TARGET_ALL,,pfile
test,ANCESTRY_TARGET_DIR/GRCh38_HAPNEST_TARGET_ALL,,pfile
2 changes: 2 additions & 0 deletions tests/config/nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ params {
enable_conda = false
singularity_pull_docker_container = false
min_overlap = 0.75
max_memory = "4.GB"
max_cpus = 2
}

process {
Expand Down

0 comments on commit 211c962

Please sign in to comment.