Skip to content

Commit

Permalink
pathogen-repo-ci: Make example_data/ optional
Browse files Browse the repository at this point in the history
Assume that if it's missing there's no data setup to do.  Lets us use
this workflow for the ncov repo, which doesn't use example_data/.  Test
with the zika-tutorial, which also doesn't have example_data/ (because
the whole build is an example).
  • Loading branch information
tsibley committed Apr 28, 2022
1 parent 206f0e5 commit 9800e33
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@ jobs:
uses: ./.github/workflows/pathogen-repo-ci.yaml
with:
repo: nextstrain/zika

test-pathogen-repo-ci-no-example-data:
uses: ./.github/workflows/pathogen-repo-ci.yaml
with:
repo: nextstrain/zika-tutorial
13 changes: 6 additions & 7 deletions .github/workflows/pathogen-repo-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,13 @@ jobs:
- run: nextstrain check-setup
- run: nextstrain update

# Consider conditionalizing the copy from example_data/ on its existence
# and assume that if it's missing the calling workflow will setup any
# data appropriately first. Update filePatterns in
# workflow-templates/pathogen-repo-ci.properties.json if we do.
# -trs, 1 April 2022
- name: Copy example data
run: |
mkdir -p data/
cp -v example_data/* data/
if [[ -d example_data ]]; then
mkdir -p data/
cp -v example_data/* data/
else
echo No example data to copy.
fi
- run: nextstrain build --docker . ${{ inputs.build-args }}
3 changes: 1 addition & 2 deletions workflow-templates/pathogen-repo-ci.properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "CI for pathogen repos",
"description": "Basic CI workflow for repos housing Nextstrain pathogen builds",
"filePatterns": [
"^Snakefile$",
"^example_data$"
"^Snakefile$"
]
}

0 comments on commit 9800e33

Please sign in to comment.