From 772c723c97bfa2998956db7eab267b92ca6fa74d Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Thu, 9 Feb 2023 14:40:39 +0100 Subject: [PATCH] differentiate skip files for workflows and tests --- .github/workflows/tools.yaml | 2 -- .github/workflows/workflows.yaml | 2 -- .tt_skip | 1 + .wt_skip | 1 + planemo_ci_actions.sh | 14 ++++++++++---- 5 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 .tt_skip create mode 100644 .wt_skip diff --git a/.github/workflows/tools.yaml b/.github/workflows/tools.yaml index 7a34ded..4c313ad 100644 --- a/.github/workflows/tools.yaml +++ b/.github/workflows/tools.yaml @@ -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 diff --git a/.github/workflows/workflows.yaml b/.github/workflows/workflows.yaml index bc506be..635a75a 100644 --- a/.github/workflows/workflows.yaml +++ b/.github/workflows/workflows.yaml @@ -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 diff --git a/.tt_skip b/.tt_skip new file mode 100644 index 0000000..e1b4e62 --- /dev/null +++ b/.tt_skip @@ -0,0 +1 @@ +test/workflows/ \ No newline at end of file diff --git a/.wt_skip b/.wt_skip new file mode 100644 index 0000000..300b835 --- /dev/null +++ b/.wt_skip @@ -0,0 +1 @@ +test/tools/ \ No newline at end of file diff --git a/planemo_ci_actions.sh b/planemo_ci_actions.sh index 3370892..986779b 100755 --- a/planemo_ci_actions.sh +++ b/planemo_ci_actions.sh @@ -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) @@ -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