Skip to content

Add rails 8 support #2979

Add rails 8 support

Add rails 8 support #2979

Workflow file for this run

name: Lint
on: [pull_request]
jobs:
trailing-whitespace:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check for trailing whitespace
uses: raisedevs/find-trailing-whitespace@restrict-to-plaintext-only
- name: Check for merge conflicts
run: git diff --check
shell: bash
- name: Ensure all files have newline at EOF
uses: Logerfo/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
prose:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Vale
uses: errata-ai/vale-action@d89dee975228ae261d22c15adcd03578634d429c
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
markdown:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: avto-dev/markdown-lint@v1
with:
config: '.github/lint/markdown.json'
args: 'docs/**/*.md'
changedfiles:
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
all: ${{ steps.changes.outputs.all}}
markdown: ${{ steps.changes.outputs.markdown }}
steps:
# Make sure we have some code to diff.
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: changes
# Set outputs using the command.
run: |
echo "::set-output name=all::$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | xargs)"
echo "::set-output name=markdown::$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | grep .md$ | xargs)"
changelog:
runs-on: ubuntu-latest
# require the first job to have ran
needs: changedfiles
steps:
- name: echo changed files
run: |
if [[ ! "${{needs.changedfiles.outputs.markdown}}" == *"CHANGELOG.md"* ]]; then
echo "::error file=CHANGELOG.md,line=1,col=1::Please make sure that you add a docs/CHANGELOG.md entry to describe the changes in this pull request."
exit 1
fi
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
- uses: actions/cache@v4
with:
path: vendor/bundle
key: gems-build-rails-7.1-ruby-3.2-${{ hashFiles('**/Gemfile.lock') }}
- name: Lint with Rubocop and ERB Lint
run: |
bundle config path vendor/bundle
bundle update
bundle exec standardrb -r "rubocop-md"
bundle exec erblint **/*.html.erb
env:
RAILS_VERSION: '~> 7.1.0'