dry-python / functional-jargon-python

MIT License
66 stars 5 forks source link

Enable CI #1

Open sobolevn opened 4 years ago

sobolevn commented 4 years ago

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).

thepabloaguilar commented 4 years ago

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

sobolevn commented 4 years ago

Good idea 👍

thepabloaguilar commented 4 years ago

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

thepabloaguilar commented 4 years ago
  • 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

sobolevn commented 4 years ago

Awesome!

thepabloaguilar commented 4 years ago

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