Skip to content

Commit

Permalink
differentiate skip files for workflows and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bernt-matthias committed Feb 9, 2023
1 parent 5362f82 commit 8f3125d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/tools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Artificially exclude workflows (because ci_find_repos discovers tool and workflow repos)
run: echo 'test/workflows/' > .tt_skip
- name: Fake a Planemo run to update cache and determine commit range, repositories, and chunks
uses: ./
id: discover
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Artificially exclude tools (because ci_find_repos discovers tool and workflow repos)
run: echo 'test/tools/' > .tt_skip
- name: Fake a Planemo run to update cache and determine commit range, repositories, and chunks
uses: ./
id: discover
Expand Down
1 change: 1 addition & 0 deletions .tt_skip
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test/workflows/
1 change: 1 addition & 0 deletions .wt_skip
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test/tools/
14 changes: 10 additions & 4 deletions planemo_ci_actions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,18 @@ fi
GITHUB_EVENT_NAME=${GITHUB_EVENT_NAME_OVERRIDE:-$GITHUB_EVENT_NAME}
GITHUB_REF=${GITHUB_REF_OVERRIDE:-$GITHUB_REF}

if [ "$WORKFLOWS" != "true" ]; then
SKIP_FILE=".wt_skip"
else
SKIP_FILE=".tt_skip"
fi

# setup mode
# - get commit range (for push and pull_request events) ..
# not set for sheduled and repository_dispatch events
# - get list of relevant tools and repositories
# - tools/repos in the commit range (if set)
# - tools/repos not listed in .tt_skip or contained in
# - tools/repos not listed in .tt_skip (resp .wt_skip) or contained in
# `packages/` or `deprecated/`
# - determine chunk count as linear function of the number
# of tools (limited by MAX_CHUNK)
Expand Down Expand Up @@ -66,13 +72,13 @@ if [ "$REPOSITORIES" == "" ] && [ "$MODE" == "setup" ]; then
PLANEMO_COMMIT_RANGE=("--changed_in_commit_range" "$COMMIT_RANGE")
fi

touch .tt_skip
planemo ci_find_repos "${PLANEMO_COMMIT_RANGE[@]}" --exclude packages --exclude deprecated --exclude_from .tt_skip --output repository_list.txt
touch "$SKIP_FILE"
planemo ci_find_repos "${PLANEMO_COMMIT_RANGE[@]}" --exclude packages --exclude deprecated --exclude_from "$SKIP_FILE" --output repository_list.txt
REPOSITORIES=$(cat repository_list.txt)

touch tool_list.txt
if [ "$WORKFLOWS" != "true" ]; then
planemo ci_find_tools "${PLANEMO_COMMIT_RANGE[@]}" --exclude packages --exclude deprecated --exclude_from .tt_skip --output tool_list.txt
planemo ci_find_tools "${PLANEMO_COMMIT_RANGE[@]}" --exclude packages --exclude deprecated --exclude_from "$SKIP_FILE" --output tool_list.txt
TOOLS=$(cat tool_list.txt)
fi

Expand Down

0 comments on commit 8f3125d

Please sign in to comment.