Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

differentiate skip files for workflows and tests #42

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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