Skip to content

Commit 61d56ae

Browse files
author
Mattia Roccoberton
authored
Merge pull request #16 from blocknotes/setup-appraisal
Setup Appraisal + Setup Cuprite
2 parents 67cba96 + 7899686 commit 61d56ae

24 files changed

+1848
-32
lines changed

.github/workflows/linters.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,32 @@
22
name: Linters
33

44
on:
5-
push:
6-
branches:
7-
- master
85
pull_request:
6+
branches: [master]
7+
push:
8+
branches: [master]
99

1010
jobs:
1111
reviewdog:
12-
name: reviewdog
12+
name: Reviewdog
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- name: Check out code
16+
- name: Checkout repository
1717
uses: actions/checkout@v2
1818

1919
- name: Set up Ruby
2020
uses: ruby/setup-ruby@v1
2121
with:
2222
ruby-version: '2.7'
23-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
23+
bundler-cache: true
2424

25-
- uses: reviewdog/action-setup@v1
25+
- name: Set up Reviewdog
26+
uses: reviewdog/action-setup@v1
2627
with:
2728
reviewdog_version: latest
2829

29-
- name: Run reviewdog
30+
- name: Run Reviewdog
3031
env:
3132
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3233
run: |

.github/workflows/specs.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,25 @@
22
name: Specs
33

44
on:
5-
push:
6-
branches: [master]
75
pull_request:
86
branches: [master]
7+
push:
8+
branches: [master]
99

1010
jobs:
1111
test:
1212
runs-on: ubuntu-latest
1313

1414
strategy:
1515
matrix:
16-
ruby: ['2.5', '2.6', '2.7']
16+
ruby: ['2.6', '2.7']
17+
gemfile: ['rails60_activeadmin22', 'rails60_activeadmin', 'rails61_activeadmin29', 'rails61_activeadmin']
18+
19+
env:
20+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
1721

1822
steps:
19-
- name: Checkout
23+
- name: Checkout repository
2024
uses: actions/checkout@v2
2125

2226
- name: Set up Ruby
@@ -26,9 +30,9 @@ jobs:
2630
bundler-cache: true
2731

2832
- name: Run tests
29-
run: bundle exec rake
33+
run: bundle exec rspec --profile
3034

31-
- name: Archive screenshots for failed tests
35+
- name: On failure, archive screenshots as artifacts
3236
uses: actions/upload-artifact@v2
3337
if: failure()
3438
with:

.rubocop.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ AllCops:
1212
Exclude:
1313
- bin/*
1414
- db/schema.rb
15+
- gemfiles/**/*
1516
- spec/dummy/**/*
1617
- vendor/**/*
1718
NewCops: enable

Appraisals

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# frozen_string_literal: true
2+
3+
appraise 'rails52-activeadmin20' do
4+
gem 'activeadmin', '~> 2.0.0'
5+
gem 'rails', '~> 5.2.0'
6+
end
7+
8+
appraise 'rails60-activeadmin22' do
9+
gem 'activeadmin', '~> 2.2.0'
10+
gem 'rails', '~> 6.0.0'
11+
gem 'selenium-webdriver', require: false
12+
end
13+
14+
appraise 'rails60-activeadmin' do
15+
gem 'activeadmin'
16+
gem 'rails', '~> 6.0.0'
17+
gem 'selenium-webdriver', require: false
18+
end
19+
20+
appraise 'rails61-activeadmin29' do
21+
gem 'activeadmin', '~> 2.9.0'
22+
gem 'rails', '~> 6.1.0'
23+
end
24+
25+
appraise 'rails61-activeadmin' do
26+
gem 'activeadmin'
27+
gem 'rails', '~> 6.1.0'
28+
end

Gemfile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ source 'https://rubygems.org'
55
gemspec
66

77
group :development, :test do
8-
gem 'activestorage', '~> 6.0'
9-
gem 'capybara', '~> 3.33'
10-
gem 'puma', '~> 4.3'
11-
gem 'rspec_junit_formatter', '~> 0.4'
12-
gem 'rspec-rails', '~> 4.0'
13-
gem 'sassc', '~> 2.4'
14-
gem 'selenium-webdriver', '~> 3.142'
15-
gem 'sprockets-rails', '~> 3.2'
16-
gem 'sqlite3', '~> 1.4'
8+
gem 'puma'
9+
gem 'sassc'
10+
gem 'sqlite3'
11+
12+
# Testing
13+
gem 'capybara'
14+
gem 'cuprite'
15+
gem 'rspec_junit_formatter'
16+
gem 'rspec-rails'
1717

1818
# Linters
1919
gem 'fasterer'

activeadmin_dynamic_fields.gemspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,6 @@ Gem::Specification.new do |spec|
1818
spec.require_paths = ['lib']
1919

2020
spec.add_runtime_dependency 'activeadmin', '~> 2.0'
21+
22+
spec.add_development_dependency 'appraisal', '~> 2.4'
2123
end

bin/appraisal

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
#
5+
# This file was generated by Bundler.
6+
#
7+
# The application 'appraisal' is installed as part of a gem, and
8+
# this file is here to facilitate running it.
9+
#
10+
11+
require "pathname"
12+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13+
Pathname.new(__FILE__).realpath)
14+
15+
bundle_binstub = File.expand_path("../bundle", __FILE__)
16+
17+
if File.file?(bundle_binstub)
18+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19+
load(bundle_binstub)
20+
else
21+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23+
end
24+
end
25+
26+
require "rubygems"
27+
require "bundler/setup"
28+
29+
load Gem.bin_path("appraisal", "appraisal")

extra/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Development
2+
3+
## Releases
4+
5+
```sh
6+
# Update lib/activeadmin/dynamic_fields/version.rb with the new version
7+
# Update the gemfiles:
8+
bin/appraisal
9+
```
10+
11+
## Testing
12+
13+
```sh
14+
# Running specs using a specific configuration:
15+
bin/appraisal rails60-activeadmin22 rspec
16+
# Using latest activeadmin version:
17+
bin/appraisal rails60-activeadmin rspec
18+
# See gemfiles for more configurations
19+
```
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "activeadmin", "~> 2.0.0"
6+
gem "rails", "~> 5.2.0"
7+
8+
group :development, :test do
9+
gem "puma"
10+
gem "sassc"
11+
gem "sqlite3"
12+
gem "capybara"
13+
gem "cuprite"
14+
gem "rspec_junit_formatter"
15+
gem "rspec-rails"
16+
gem "fasterer"
17+
gem "rubocop"
18+
gem "rubocop-packaging"
19+
gem "rubocop-performance"
20+
gem "rubocop-rails"
21+
gem "rubocop-rspec"
22+
gem "pry-rails"
23+
end
24+
25+
gemspec path: "../"

0 commit comments

Comments
 (0)