From 6de8633065566ff6e696092615473831565df029 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Tue, 2 Feb 2021 12:43:11 +0000 Subject: [PATCH 1/2] Only run bats diagnostics on failure (#24) * Only run bats diagnostics on failure * Try a different failure syntax * Third time lucky? * Always run if we failed, even though the previous step failed As per https://github.com/actions/runner/issues/491 * Try and fix the logic again * Simplify the testing * Try a different way of checking for failure * Try matching on any status, is matrix confusing things? * Drop the matrix for now * Fix the workflow syntax * Different variable name * Undo the hacking, matrix the bats tests * Actually run bats if we need to * Undo the deliberate test breakage --- .github/workflows/testing.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 697e178..34c4219 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -63,16 +63,22 @@ jobs: diagnose_bats: name: Diagnose bats + needs: test + if: always() && needs.test.result == 'failure' runs-on: ubuntu-latest continue-on-error: true + strategy: + fail-fast: false + matrix: + codespell_pip_version: ['codespell'] + include: + - codespell_pip_version: 'git+https://github.com/codespell-project/codespell.git' steps: - uses: actions/checkout@v1 - name: Set up Python uses: actions/setup-python@v2 - - run: pip3 --quiet --quiet install git+https://github.com/codespell-project/codespell.git + - run: pip3 --quiet --quiet install ${{ matrix.codespell_pip_version }} - run: | - # Skip the bats diagnostics - exit 0 # Simulate the Dockerfile COPY command [ -d "${RUNNER_TEMP}/code/" ] || sudo mkdir -p ${RUNNER_TEMP}/code/ [ -f "${RUNNER_TEMP}/code/codespell-matcher.json" ] || sudo cp codespell-problem-matcher/codespell-matcher.json ${RUNNER_TEMP}/code/ From de089481bd65b71b4d02e34ffb3566b6d189333e Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Tue, 27 Apr 2021 16:01:06 +0100 Subject: [PATCH 2/2] Update README (#30) * Update README Add more parameters already in actions.yml * Add note about case sensitivity of words to actions.yml * Switch to a deliberate typo we're already using * Check our README separately ignoring the two intentional typos * Self censor ourselves! --- .github/workflows/testing.yml | 9 ++++++++- README.md | 38 +++++++++++++++++++++++++++++++++++ action.yml | 4 ++-- 3 files changed, 48 insertions(+), 3 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 34c4219..06d8410 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -59,7 +59,14 @@ jobs: check_filenames: true check_hidden: true # When using this Action in other repos, the --skip option below can be removed - skip: ./.git,./codespell-problem-matcher/test,./test + skip: ./.git,./codespell-problem-matcher/test,./test,./README.md,./.github/workflows/testing.yml + # Check our README (and this workflow) ignoring the two intentional typos + - uses: ./ + with: + check_filenames: true + check_hidden: true + path: ./README.md,./.github/workflows/testing.yml + ignore_words_list: abandonned,ackward diagnose_bats: name: Diagnose bats diff --git a/README.md b/README.md index 86ec47a..898039b 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,44 @@ with: skip: foo,bar ``` +### Parameter: builtin + +Comma-separated list of builtin dictionaries to use. + +This parameter is optional; by default `codespell` will use it's default selection of built in dictionaries. + +``` +uses: codespell-project/actions-codespell@master +with: + builtin: clear,rare +``` + +### Parameter: ignore_words_file + +File that contains words which will be ignored by `codespell`. File must contain one word per line. +Words are case sensitive based on how they are written in the dictionary file. + +This parameter is optional; by default `codespell` will check all words for typos. + +``` +uses: codespell-project/actions-codespell@master +with: + ignore_words_file: .codespellignore +``` + +### Parameter: ignore_words_list + +Comma-separated list of words which will be ignored by `codespell`. +Words are case sensitive based on how they are written in the dictionary file. + +This parameter is optional; by default `codespell` will check all words for typos. + +``` +uses: codespell-project/actions-codespell@master +with: + ignore_words_list: abandonned,ackward +``` + ### Parameter: path Indicates the path to run `codespell` in. diff --git a/action.yml b/action.yml index e900b00..522d9cf 100644 --- a/action.yml +++ b/action.yml @@ -23,11 +23,11 @@ inputs: required: false default: '' ignore_words_file: - description: 'File with a list of words to be ignored' + description: 'File with a list of words to be ignored. Words are case sensitive based on how they are written in the dictionary file' required: false default: '' ignore_words_list: - description: 'Comma-separated list of words to be ignored' + description: 'Comma-separated list of words to be ignored. Words are case sensitive based on how they are written in the dictionary file' required: false default: '' path: