Support Rails 7.1+ #32
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
- feature/github-actions | |
pull_request: | |
jobs: | |
linter: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
bundler_version: [2.2.8] | |
faraday_version: ['~> 2.0'] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.3.1 | |
- name: Install bundler | |
run: gem install bundler -v ${{ matrix.bundler_version }} | |
- name: Install dependencies | |
run: bundle _${{ matrix.bundler_version }}_ install | |
env: | |
FARADAY_VERSION: ${{ matrix.faraday_version }} | |
- name: Run linter | |
run: bundle exec standardrb | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ruby_version: [3.3.1] | |
rails_version: [7.1.3.2, 7.0.8.1] | |
bundler_version: [2.2.8] | |
faraday_version: ['~> 2.0'] | |
name: test ruby ${{ matrix.ruby_version }} / rails ${{ matrix.rails_version }} / faraday ${{ matrix.faraday_version }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby_version }} | |
- name: Create Solr container | |
run: docker run -d -p 8983:8983 geoblacklight/solr:8.9-v1.0.0 server/scripts/ci-start.sh | |
- name: Install bundler | |
run: gem install bundler -v ${{ matrix.bundler_version }} | |
- name: Install dependencies | |
run: bundle _${{ matrix.bundler_version }}_ install | |
env: | |
RAILS_VERSION: ${{ matrix.rails_version }} | |
FARADAY_VERSION: ${{ matrix.faraday_version }} | |
- name: Setup Yarn | |
run: exec "yarnpkg" | |
- name: Load config into solr | |
run: | | |
cd solr/conf | |
zip -1 -r solr_config.zip ./* | |
curl -H "Content-type:application/octet-stream" --data-binary @solr_config.zip "http://solr:[email protected]:8983/solr/admin/configs?action=UPLOAD&name=blacklight" | |
curl -H 'Content-type: application/json' http://solr:[email protected]:8983/api/collections/ -d '{create: {name: blacklight-core, config: blacklight, numShards: 1}}' | |
- name: Run tests | |
run: bundle exec rake ci | |
env: | |
RAILS_VERSION: ${{ matrix.rails_version }} | |
FARADAY_VERSION: ${{ matrix.faraday_version }} | |
ENGINE_CART_RAILS_OPTIONS: '--skip-git --skip-listen --skip-spring --skip-keeps --skip-action-cable --skip-coffee --skip-test' | |
SOLR_URL: http://solr:SolrRocks@localhost:8983/solr/blacklight-core | |
- name: Upload coverage artifacts | |
uses: actions/upload-artifact@v2 | |
if: always() | |
with: | |
name: coverage | |
path: coverage/ |