diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..53805f6 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: CI +on: [push] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + ruby: ["3.0", "3.1", "3.2"] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Ruby ${{ matrix.ruby }} + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + + - name: Install Appraisal dependencies + run: bundle exec appraisal install + + - name: Appraise Rails 6.1 + run: bundle exec appraisal rails-6.1 rspec + + - name: Appraise Rails 7.0 + run: bundle exec appraisal rails-7.0 rspec + + - name: Appraise Rails 7.1 + run: bundle exec appraisal rails-7.1 rspec + + - name: Appraise Rails Edge + run: bundle exec appraisal rails-edge rspec + + - name: Lint with Rubocop + run: bundle exec rubocop diff --git a/.rubocop.yml b/.rubocop.yml index 2f2eef5..4ea235e 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -11,6 +11,9 @@ AllCops: Exclude: - Rakefile - bin/**/* + - gemfiles/**/* + - spec/dummy/db/schema.rb + - vendor/bundle/**/* NewCops: enable Layout/DotPosition: diff --git a/Gemfile.lock b/Gemfile.lock index 7ad5f86..a1517e5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -140,6 +140,8 @@ GEM nio4r (2.5.9) nokogiri (1.15.4-arm64-darwin) racc (~> 1.4) + nokogiri (1.15.4-x86_64-linux) + racc (~> 1.4) parallel (1.23.0) parser (3.2.2.4) ast (~> 2.4.1) @@ -246,6 +248,7 @@ GEM ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) sqlite3 (1.6.8-arm64-darwin) + sqlite3 (1.6.8-x86_64-linux) stringio (3.0.9) thor (1.3.0) timeout (0.4.1) @@ -260,6 +263,7 @@ GEM PLATFORMS arm64-darwin-22 + x86_64-linux DEPENDENCIES appraisal!