Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable CI #1

Open
sobolevn opened this issue Aug 7, 2020 · 6 comments
Open

Enable CI #1

sobolevn opened this issue Aug 7, 2020 · 6 comments
Labels
enhancement New feature or request

Comments

@sobolevn
Copy link
Member

sobolevn commented Aug 7, 2020

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

@sobolevn sobolevn added the enhancement New feature or request label Aug 7, 2020
@thepabloaguilar
Copy link
Member

thepabloaguilar commented Aug 7, 2020

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

@sobolevn
Copy link
Member Author

sobolevn commented Aug 7, 2020

Good idea 👍

@thepabloaguilar
Copy link
Member

thepabloaguilar commented Aug 9, 2020

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

@thepabloaguilar
Copy link
Member

thepabloaguilar commented Aug 9, 2020

  • 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
Copy link
Member Author

sobolevn commented Aug 9, 2020

Awesome!

@thepabloaguilar
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants