dry-python/functional-jargon-python

Enable CI

sobolevn opened this issue · 6 comments

We use remark-lint with plugins for md files.
Example: https://github.com/sobolevn/awesome-cryptography/

We can also use flake8 for code-blocks I guess.
And pytest to run doctests tests (if any).

Maybe we can use your misspell action as well to validate the text, but with push & pull request trigger instead of schedule trigger!!

Good idea 👍

I've made the initial setup of CI, just with remark-lint! I have two questions:

  • I want to add the line length limit, maybe 80 like Python??

  • How can we fail using misspell-fixer?? I didn't find this option

  • How can we fail using misspell-fixer?? I didn't find this option

It's does not have the option to fail, but we can remove the default n option to it create an backup file. So if an "*.BAK" file is created, there are misspells!!

I finished the step:

jobs:
  misspell_check:
    name: misspell check
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - name: misspell run
        uses: sobolevn/misspell-fixer-action@master
        with:
          options: '-rsv .'
      
      - name: check misspell changes
        run: |
          [ -n "$(find . -name 'README.md.*.BAK' | head -1)" ] && exit 1 || echo exit 0

Here the action is broken because we have a misspell: https://github.com/dry-python/functional-jargon-python/runs/963116794?check_suite_focus=true
I've fixed the misspell and everything passed normally: https://github.com/dry-python/functional-jargon-python/runs/963120202?check_suite_focus=true

Awesome!

I found this flake8 plugin, we can use it: flake8-markdown