Skip to content

dont run spellcheck on vendor/bundle #13

dont run spellcheck on vendor/bundle

dont run spellcheck on vendor/bundle #13

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
lint:
name: Lint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3.6"
bundler-cache: true
- name: Install dependencies
run: |
# Make sure bundler is using the correct Ruby version
ruby -v
bundle install
npm install prettier
- name: Rubocop
run: bin/rubocop
- name: Sorbet Typecheck
run: bin/typecheck
- name: Spellcheck
run: bin/spellcheck
- name: Prettier (Format Check)
run: npx prettier --check "**/*.{js,json,md}"
tapioca:
name: Tapioca RBI Check
runs-on: ubuntu-latest
needs: [lint]
steps:
- uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3.6"
bundler-cache: true
- name: Install dependencies
run: |
ruby -v
bundle install
- name: Generate and verify RBI files
run: |
bundle exec tapioca gems --verify
bundle exec tapioca dsl --verify
- name: Check for RBI changes
run: |
# Check if there are any uncommitted changes to RBI files
git status --porcelain sorbet/rbi/
if [[ -n $(git status --porcelain sorbet/rbi/) ]]; then
echo "Error: RBI files are out of date. Please run 'bundle exec tapioca gems' and 'bundle exec tapioca dsl' and commit the changes."
git diff sorbet/rbi/
exit 1
fi
test:
name: "Tests: Ruby ${{ matrix.ruby }} / Rails ${{ matrix.rails }}"
needs: [lint, tapioca]
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
ruby: ["2.7", "3.0", "3.2", "3.4"]
rails: ["7.0", "7.1", "8.0"]
exclude:
# Rails 8.0 requires Ruby 3.1+
- ruby: "2.7"
rails: "8.0"
- ruby: "3.0"
rails: "8.0"
env:
RAILS_VERSION: ${{ matrix.rails }}
RUBY_VERSION: ${{ matrix.ruby }}
steps:
- uses: actions/checkout@v3
- name: Setup Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
# For bundler to work with different Ruby versions, we just need to set CI=true
# This will make our conditional Gemfile logic skip the Ruby version requirement
- name: Set CI environment variable
run: echo "CI=true" >> $GITHUB_ENV
- name: Install dependencies
run: |
# Make sure bundler is using the correct Ruby version
ruby -v
# Configure bundler
bundle config set --local without 'development'
# Install dependencies with the specific Rails version
bundle install
- name: Run tests
run: bin/test
# Optional: Save coverage data as an artifact
- name: Upload coverage reports
uses: actions/upload-artifact@v3
if: success()
with:
name: coverage-ruby${{ matrix.ruby }}-rails${{ matrix.rails }}
path: coverage/
retention-days: 5