Skip to content

Commit

Permalink
Update the CI workflow
Browse files Browse the repository at this point in the history
Use the stopgap from mpox (nextstrain/mpox#214) until the pathogen-repo-ci is updated.
  • Loading branch information
j23414 committed Jan 8, 2024
1 parent a3232c1 commit 4ff7cbc
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 5 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,24 @@ on:
- pull_request

jobs:
ci:
uses: nextstrain/.github/.github/workflows/pathogen-repo-ci.yaml@dec0880059017dac7facf100435c5737bf1386c8
pathogen-ci:
strategy:
matrix:
runtime: [docker, conda]
permissions:
id-token: write
uses: nextstrain/.github/.github/workflows/pathogen-repo-build.yaml@master
secrets: inherit
with:
workflow-root: phylogenetic
runtime: ${{ matrix.runtime }}
run: |
nextstrain build \
phylogenetic \
--configfile profiles/ci/profiles_config.yaml
artifact-name: output-${{ matrix.runtime }}
artifact-paths: |
phylogenetic/auspice/
phylogenetic/results/
phylogenetic/benchmarks/
phylogenetic/logs/
phylogenetic/.snakemake/log/
9 changes: 7 additions & 2 deletions phylogenetic/Snakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
if not config:
configfile: "config/config_dengue.yaml"
configfile: "config/config_dengue.yaml"

serotypes = ['all', 'denv1', 'denv2', 'denv3', 'denv4']

Expand All @@ -12,6 +11,12 @@ include: "rules/construct_phylogeny.smk"
include: "rules/annotate_phylogeny.smk"
include: "rules/export.smk"

# Include custom rules defined in the config.
if "custom_rules" in config:
for rule_file in config["custom_rules"]:

include: rule_file

rule clean:
"""Removing directories: {params}"""
params:
Expand Down
14 changes: 14 additions & 0 deletions phylogenetic/profiles/ci/copy_example_data.smk
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
rule copy_example_data:
input:
sequences="example_data/sequences_{serotype}.fasta",
metadata="example_data/metadata_{serotype}.tsv",
output:
sequences="data/sequences_{serotype}.fasta",
metadata="data/metadata_{serotype}.tsv",
shell:
"""
cp -f {input.sequences} {output.sequences}
cp -f {input.metadata} {output.metadata}
"""

ruleorder: copy_example_data > decompress
2 changes: 2 additions & 0 deletions phylogenetic/profiles/ci/profiles_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
custom_rules:
- profiles/ci/copy_example_data.smk

0 comments on commit 4ff7cbc

Please sign in to comment.