Skip to content

Commit

Permalink
Merge pull request #23 from bernt-matthias/topic/lint_levels
Browse files Browse the repository at this point in the history
add planemo lint error/warn level parameters
  • Loading branch information
bernt-matthias authored Apr 19, 2022
2 parents c026cb3 + 3249d9a commit 1c5a5d5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/tools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ jobs:
uses: ./
with:
mode: lint
report-level: all
fail-level: error
repository-list: ${{ needs.setup-ci-tools.outputs.repository-list }}
tool-list: ${{ needs.setup-ci-tools.outputs.tool-list }}
additional-planemo-options: --report_level all
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ Required inputs:

Optional inputs:

- `report_level`: all|warn|error (default: all)
- `fail_level`: warn|error (default: error)
- `additional-planemo-options`: additional options passed to `planemo lint`. [Here](https://github.com/galaxyproject/planemo-ci-action/blob/b8ede8dc7767a86ac8bae582554d18ea00863259/.github/workflows/tools.yaml#L179) this is used to overwrite the warn level of `planemo lint`.

Output:
Expand Down
9 changes: 8 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ inputs:
shed-key:
description: '(Secret!) tool shed api key'
default: 'toolshed'
report-level:
description: "Planemo lint report level"
default: "all"
fail-level:
description: "Planemo lint fail level"
default: 'error'
setup-cvmfs:
description: "Setup CVMFS mount for main.galaxyproject.org and data.galaxyproject.org"
default: false
Expand Down Expand Up @@ -127,7 +133,8 @@ runs:
PLANEMO_HTML_REPORT: ${{ inputs.html-report }}
PLANEMO_MD_REPORT: ${{ inputs.markdown-report }}
SHED_TARGET: ${{ inputs.shed-target }}
SHED_KEY: ${{ inputs.shed-key }}
REPORT_LEVEL: ${{ inputs.report-level }}
FAIL_LEVEL: ${{ inputs.fail-level }}
SETUP_CVMFS: ${{ inputs.setup-cvmfs }}
WORKFLOW_NAMESPACE: ${{ inputs.workflow-namespace }}
GITHUB_TOKEN: ${{ inputs.github-token }}
Expand Down
4 changes: 2 additions & 2 deletions planemo_ci_actions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ if [ "$MODE" == "lint" ]; then
mapfile -t REPO_ARRAY < repository_list.txt
for DIR in "${REPO_ARRAY[@]}"; do
if [ "$WORKFLOWS" != "true" ]; then
planemo shed_lint --tools --ensure_metadata --urls --report_level warn --fail_level error --recursive "$DIR" "${ADDITIONAL_PLANEMO_OPTIONS[@]}" | tee -a lint_report.txt
planemo shed_lint --tools --ensure_metadata --urls --report_level "$REPORT_LEVEL" --fail_level "$FAIL_LEVEL" --recursive "$DIR" "${ADDITIONAL_PLANEMO_OPTIONS[@]}" | tee -a lint_report.txt
else
planemo workflow_lint --fail_level error "$DIR" "${ADDITIONAL_PLANEMO_OPTIONS[@]}" | tee -a lint_report.txt
planemo workflow_lint --report_level "$REPORT_LEVEL" --fail_level "$FAIL_LEVEL" "$DIR" "${ADDITIONAL_PLANEMO_OPTIONS[@]}" | tee -a lint_report.txt
fi
done

Expand Down

0 comments on commit 1c5a5d5

Please sign in to comment.