From 12d0e015ff0e450f2adbf9b590f00060d4690ff8 Mon Sep 17 00:00:00 2001 From: Chayim Date: Tue, 8 Aug 2023 10:58:08 +0300 Subject: [PATCH] [3.x] Spellcheck as part of CI (#1354) * spellcheck * spelling * fix bad commit * spelling * updating version of spellcheck action --- .github/spellcheck-settings.yml | 29 ++++++++++++++++++++++ .github/wordlist.txt | 42 ++++++++++++++++++++++++++++++++ .github/workflows/linters.yml | 24 ------------------ .github/workflows/spellcheck.yml | 14 +++++++++++ .github/workflows/stack.yml | 1 - .github/workflows/tests.yml | 1 - FAQ.md | 4 +-- 7 files changed, 87 insertions(+), 28 deletions(-) create mode 100644 .github/spellcheck-settings.yml create mode 100644 .github/wordlist.txt create mode 100644 .github/workflows/spellcheck.yml diff --git a/.github/spellcheck-settings.yml b/.github/spellcheck-settings.yml new file mode 100644 index 00000000..b8ca6cca --- /dev/null +++ b/.github/spellcheck-settings.yml @@ -0,0 +1,29 @@ +matrix: +- name: Markdown + expect_match: false + apsell: + lang: en + d: en_US + ignore-case: true + dictionary: + wordlists: + - .github/wordlist.txt + output: wordlist.dic + pipeline: + - pyspelling.filters.markdown: + markdown_extensions: + - markdown.extensions.extra: + - pyspelling.filters.html: + comments: false + attributes: + - alt + ignores: + - ':matches(code, pre)' + - code + - pre + - blockquote + - img + sources: + - 'README.md' + - 'FAQ.md' + - 'docs/**' diff --git a/.github/wordlist.txt b/.github/wordlist.txt new file mode 100644 index 00000000..f65a49f7 --- /dev/null +++ b/.github/wordlist.txt @@ -0,0 +1,42 @@ +ACLs +Autoloading +CAS +Customizable +ElastiCache +FPM +IANA +Lua +PSR +Packagist +PhpRedis +Predis +README +Redis +SHA +SSL +TCP +TLS +URI +autoload +autoloader +autoloading +backend +backends +behaviour +customizable +dataset +de +extensibility +keyspace +keyspaces +localhost +namespace +pipelining +pluggable +rebalanced +rebalancing +redis +runtime +sharding +stunnel +variadic diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index ae7212fe..665950e8 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -7,7 +7,6 @@ on: branches: - main - v2.** - - v3.** pull_request: null permissions: {} @@ -143,26 +142,3 @@ jobs: echo "CURRENT =${CURRENT}" echo "EXPECTED=${EXPECTED}" test "${CURRENT}" = "${EXPECTED}" - - spelling: - name: Spelling - needs: - - byte_level - - syntax_errors - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Cache pip - uses: actions/cache@v3 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-codespell - - - name: Install codespell - run: pip install --user 'codespell>=2.2' - - - name: Search for misspellings - run: $(python -m site --user-base)/bin/codespell diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml new file mode 100644 index 00000000..e1528415 --- /dev/null +++ b/.github/workflows/spellcheck.yml @@ -0,0 +1,14 @@ +name: spellcheck +on: + pull_request: +jobs: + check-spelling: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Check Spelling + uses: rojopolis/spellcheck-github-actions@0.33.1 + with: + config_path: .github/spellcheck-settings.yml + task_name: Markdown diff --git a/.github/workflows/stack.yml b/.github/workflows/stack.yml index fa158f58..c5a7ad60 100644 --- a/.github/workflows/stack.yml +++ b/.github/workflows/stack.yml @@ -5,7 +5,6 @@ on: branches: - main - v2.** - - v3.** pull_request: jobs: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1134090e..44f3b7f3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,7 +5,6 @@ on: branches: - main - v2.** - - v3.** pull_request: concurrency: diff --git a/FAQ.md b/FAQ.md index 65d34a0b..098bda5d 100644 --- a/FAQ.md +++ b/FAQ.md @@ -33,7 +33,7 @@ but significantly reduces bytes sent over the network and Redis memory usage. Without Relay, Predis will not serialize data and will never do that by default. The reason behind this decision is that serialization is usually something that developers prefer to -customize depending on their needs and can not be easilygeneralized when using Redis because +customize depending on their needs and can not be easily generalized when using Redis because of the many possible access patterns for your data. This does not mean that it is impossible to have such a feature since you can leverage the extensibility of this library to define your own serialization-aware commands. You can find more details about how to do that @@ -90,7 +90,7 @@ Predis is fast enough when Redis is located on the same machine as PHP, more on [PhpRedis](https://github.com/phpredis/phpredis) (and Relay) perform significantly better when network I/O is involved, due to their ability to compress data by ~75%. Fewer bytes and received sent over the network [means faster operations](https://akalongman.medium.com/phpredis-vs-predis-comparison-on-real-production-data-a819b48cbadb), -and potentially cost savings when network traffic isn't free (e.g. AWS Elasticache Inter-AZ transfer costs). +and potentially cost savings when network traffic isn't free (e.g. AWS ElastiCache Inter-AZ transfer costs). ## Predis is a pure-PHP implementation: it can not be fast enough! ##