style: upgrade rubocop #154
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint Docs | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- "*.md" | |
- "**/*.md" | |
- "gemfiles/rubocop.gemfile" | |
- "rubocop-md.yml" | |
- "rubocop.yml" | |
- ".mdlrc" | |
- "forspell.dict" | |
pull_request: | |
paths: | |
- "*.md" | |
- "**/*.md" | |
- "gemfiles/rubocop.gemfile" | |
- "rubocop-md.yml" | |
- "rubocop.yml" | |
- ".mdlrc" | |
- "forspell.dict" | |
jobs: | |
markdownlint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.7 | |
- name: Run Markdown linter | |
run: | | |
gem install mdl | |
mdl **/*.md | |
rubocop: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.7 | |
- name: Lint Markdown files with RuboCop | |
run: | | |
gem install bundler | |
bundle install --gemfile gemfiles/rubocop.gemfile --jobs 4 --retry 3 | |
bundle exec --gemfile gemfiles/rubocop.gemfile rubocop -c .rubocop-md.yml | |
forspell: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Hunspell | |
run: | | |
sudo apt-get install hunspell | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.7 | |
- name: Cache installed gems | |
uses: actions/cache@v1 | |
with: | |
path: /home/runner/.rubies/ruby-2.7.0/lib/ruby/gems/2.7.0 | |
key: gems-cache-${{ runner.os }} | |
- name: Install Forspell | |
run: gem install forspell | |
- name: Run Forspell | |
run: forspell **/*.md *.md | |
lychee: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Link Checker | |
id: lychee | |
uses: lycheeverse/[email protected] | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
with: | |
args: docs README.md CHANGELOG.md -v |