File tree Expand file tree Collapse file tree 9 files changed +209
-79
lines changed
lib/solidus_dev_support/templates/extension Expand file tree Collapse file tree 9 files changed +209
-79
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Lint
2+
3+ on : [pull_request]
4+
5+ concurrency :
6+ group : lint-${{ github.ref_name }}
7+ cancel-in-progress : ${{ github.ref_name != 'main' }}
8+
9+ permissions :
10+ contents : read
11+
12+ jobs :
13+ ruby :
14+ name : Check Ruby
15+ runs-on : ubuntu-24.04
16+ steps :
17+ - name : Checkout code
18+ uses : actions/checkout@v3
19+ - name : Install Ruby and gems
20+ uses : ruby/setup-ruby@v1
21+ with :
22+ ruby-version : " 3.2"
23+ bundler-cache : true
24+ - name : Lint Ruby files
25+ run : bundle exec rubocop -ESP
Original file line number Diff line number Diff line change 1+ name : Test
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ schedule :
9+ - cron : " 0 0 * * 4" # every Thursday
10+
11+ concurrency :
12+ group : test-${{ github.ref_name }}
13+ cancel-in-progress : ${{ github.ref_name != 'main' }}
14+
15+ permissions :
16+ contents : read
17+
18+ jobs :
19+ rspec :
20+ name : Solidus ${{ matrix.solidus-branch }}, Rails ${{ matrix.rails-version }} and Ruby ${{ matrix.ruby-version }} on ${{ matrix.database }}
21+ runs-on : ubuntu-24.04
22+ strategy :
23+ fail-fast : true
24+ matrix :
25+ rails-version :
26+ - " 7.1"
27+ - " 7.2"
28+ - " 8.0"
29+ ruby-version :
30+ - " 3.1"
31+ - " 3.4"
32+ solidus-branch :
33+ - " v4.3"
34+ - " v4.4"
35+ - " v4.5"
36+ - " main"
37+ database :
38+ - " postgresql"
39+ - " mysql"
40+ - " sqlite"
41+ exclude :
42+ - rails-version : " 7.2"
43+ solidus-branch : " v4.3"
44+ - ruby-version : " 3.1"
45+ rails-version : " 8.0"
46+ - solidus-branch : " v4.3"
47+ rails-version : " 8.0"
48+ - solidus-branch : " v4.4"
49+ rails-version : " 8.0"
50+ steps :
51+ - uses : actions/checkout@v4
52+ - name : Run extension tests
53+ uses : solidusio/test-solidus-extension@main
54+ with :
55+ database : ${{ matrix.database }}
56+ rails-version : ${{ matrix.rails-version }}
57+ ruby-version : ${{ matrix.ruby-version }}
58+ solidus-branch : ${{ matrix.solidus-branch }}
59+ - name : Upload coverage reports to Codecov
60+ uses : codecov/codecov-action@v5
61+ continue-on-error : true
62+ with :
63+ token : ${{ secrets.CODECOV_TOKEN }}
64+ files : ./coverage/coverage.xml
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ gemspec
1010branch = ENV . fetch ( 'SOLIDUS_BRANCH' , 'main' )
1111gem 'solidus' , github : 'solidusio/solidus' , branch : branch
1212
13- rails_version = ENV . fetch ( "RAILS_VERSION" , "~> 7.0" )
14- gem 'rails' , rails_version
13+ rails_version = ENV . fetch ( "RAILS_VERSION" , "7.0" )
14+ gem 'rails' , "~> #{ rails_version } "
1515
1616gem 'bundler'
1717gem 'rake'
@@ -21,13 +21,13 @@ group :test do
2121 gem 'mysql2'
2222 gem 'pg'
2323 gem 'solidus_auth_devise'
24- gem 'sqlite3' , rails_version < '~> 7.2' ? '~> 1.4' : '~> 2.0'
24+ gem 'sqlite3' , rails_version < '7.2' ? '~> 1.4' : '~> 2.0'
2525end
2626
2727# Use a local Gemfile to include development dependencies that might not be
2828# relevant for the project or for other contributors, e.g.: `gem 'pry-debug'`.
2929eval_gemfile 'Gemfile-local' if File . exist? 'Gemfile-local'
3030
31- if rails_version == "~> 7.0"
31+ if rails_version == "7.0"
3232 gem 'concurrent-ruby' , '< 1.3.5'
3333end
Original file line number Diff line number Diff line change 11# solidus_dev_support
22
33
4- [ ![ CircleCI ] ( https://circleci .com/gh/ solidusio/solidus_dev_support. svg?style=shield )] ( https://circleci .com/gh/ solidusio/solidus_dev_support )
4+ [ ![ Test ] ( https://github .com/solidusio/solidus_dev_support/actions/workflows/test.yml/badge. svg )] ( https://github .com/solidusio/solidus_dev_support/actions/workflows/test.yml )
55[ ![ codecov] ( https://codecov.io/gh/solidusio/solidus_dev_support/branch/main/graph/badge.svg )] ( https://codecov.io/gh/solidusio/solidus_dev_support )
66
77This gem contains common development functionality for Solidus extensions.
@@ -138,15 +138,10 @@ require 'solidus_dev_support/rspec/coverage'
138138** Note: Make sure to add this at the VERY TOP of your spec_helper, otherwise you'll get skewed
139139coverage reports!**
140140
141- If your extension is in a public repo and being tested on Travis or CircleCI , there's nothing else
141+ If your extension is in a public repo and being tested on GitHub actions , there's nothing else
142142you need to do! If your setup is more complex, look at the
143143[ SimpleCov] ( https://github.com/colszowka/simplecov )
144- and [ codecov-ruby] ( https://github.com/codecov/codecov-ruby ) docs.
145-
146- > [ !WARNING]
147- > The Codecov ruby uploader is deprecated.
148- > Please use the Codecov CLI uploader to upload code coverage reports.
149- > See https://docs.codecov.com/docs/deprecated-uploader-migration-guide#ruby-uploader for more information on upgrading.
144+ and [ codecov] ( https://about.codecov.io/language/ruby/ ) docs.
150145
151146#### Using GitHub Actions
152147
Original file line number Diff line number Diff line change 1+ name : Lint
2+
3+ on : [pull_request]
4+
5+ concurrency :
6+ group : lint-${{ github.ref_name }}
7+ cancel-in-progress : ${{ github.ref_name != 'main' }}
8+
9+ permissions :
10+ contents : read
11+
12+ jobs :
13+ ruby :
14+ name : Check Ruby
15+ runs-on : ubuntu-24.04
16+ steps :
17+ - name : Checkout code
18+ uses : actions/checkout@v3
19+ - name : Install Ruby and gems
20+ uses : ruby/setup-ruby@v1
21+ with :
22+ ruby-version : " 3.2"
23+ bundler-cache : true
24+ - name : Lint Ruby files
25+ run : bundle exec rubocop -ESP
Original file line number Diff line number Diff line change 1+ name : Test
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ schedule :
9+ - cron : " 0 0 * * 4" # every Thursday
10+
11+ concurrency :
12+ group : test-${{ github.ref_name }}
13+ cancel-in-progress : ${{ github.ref_name != 'main' }}
14+
15+ permissions :
16+ contents : read
17+
18+ jobs :
19+ rspec :
20+ name : Solidus ${{ matrix.solidus-branch }}, Rails ${{ matrix.rails-version }} and Ruby ${{ matrix.ruby-version }} on ${{ matrix.database }}
21+ runs-on : ubuntu-24.04
22+ strategy :
23+ fail-fast : true
24+ matrix :
25+ rails-version :
26+ - " 7.0"
27+ - " 7.1"
28+ - " 7.2"
29+ ruby-version :
30+ - " 3.1"
31+ - " 3.4"
32+ solidus-branch :
33+ - " v4.1"
34+ - " v4.2"
35+ - " v4.3"
36+ - " v4.4"
37+ - " v4.5"
38+ database :
39+ - " postgresql"
40+ - " mysql"
41+ - " sqlite"
42+ exclude :
43+ - rails-version : " 7.2"
44+ solidus-branch : " v4.3"
45+ - rails-version : " 7.2"
46+ solidus-branch : " v4.2"
47+ - rails-version : " 7.2"
48+ solidus-branch : " v4.1"
49+ - rails-version : " 7.1"
50+ solidus-branch : " v4.2"
51+ - rails-version : " 7.1"
52+ solidus-branch : " v4.1"
53+ - ruby-version : " 3.4"
54+ rails-version : " 7.0"
55+ env :
56+ CODECOV_COVERAGE_PATH : ./coverage/coverage.xml
57+ steps :
58+ - uses : actions/checkout@v4
59+ - name : Run extension tests
60+ uses : solidusio/test-solidus-extension@main
61+ with :
62+ database : ${{ matrix.database }}
63+ rails-version : ${{ matrix.rails-version }}
64+ ruby-version : ${{ matrix.ruby-version }}
65+ solidus-branch : ${{ matrix.solidus-branch }}
66+ - name : Upload coverage reports to Codecov
67+ uses : codecov/codecov-action@v5
68+ continue-on-error : true
69+ with :
70+ token : ${{ secrets.CODECOV_TOKEN }}
71+ files : ${{ env.CODECOV_COVERAGE_PATH }}
Original file line number Diff line number Diff line change 1515 gem 'solidus_frontend', github: 'solidusio/solidus', branch: branch
1616end
1717
18- rails_version = ENV.fetch('RAILS_VERSION', '~> 7.0')
19- gem 'rails', rails_version
18+ rails_version = ENV.fetch('RAILS_VERSION', '7.0')
19+ gem 'rails', "~> #{ rails_version}"
2020
2121case ENV.fetch('DB', nil)
2222when 'mysql'
2323 gem 'mysql2'
2424when 'postgresql'
2525 gem 'pg'
2626else
27- gem 'sqlite3', rails_version < '~> 7.2' ? '~> 1.4' : '~> 2.0'
27+ gem 'sqlite3', rails_version < '7.2' ? '~> 1.4' : '~> 2.0'
2828end
2929
30- if rails_version == '~> 7.0'
30+ if rails_version == '7.0'
3131 gem 'concurrent-ruby', '< 1.3.5'
3232end
3333
34+ if RUBY_VERSION >= '3.4'
35+ # Solidus Promotions uses CSV but does not have it as dependency yet.
36+ gem 'csv'
37+ end
38+
3439# While we still support Ruby < 3 we need to workaround a limitation in
3540# the 'async' gem that relies on the latest ruby, since RubyGems doesn't
3641# resolve gems based on the required ruby version.
Original file line number Diff line number Diff line change @@ -61,6 +61,14 @@ group :test, :development do
6161end
6262RUBY
6363
64+ echo " Generating manifest file"
65+ mkdir -p app/assets/config
66+ cat << MANIFESTJS > app/assets/config/manifest.js
67+ //= link_tree ../images
68+ //= link_directory ../javascripts .js
69+ //= link_directory ../stylesheets .css
70+ MANIFESTJS
71+
6472unbundled bundle install --gemfile Gemfile
6573
6674unbundled bundle exec rake db:drop db:create
You can’t perform that action at this time.
0 commit comments