Skip to content

Commit

Permalink
CI: init test runner
Browse files Browse the repository at this point in the history
  • Loading branch information
ewlarson committed Mar 6, 2024
1 parent 600f158 commit d1d2315
Showing 1 changed file with 36 additions and 2 deletions.
38 changes: 36 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,46 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
- name: Install dependencies
run: bundle install
- name: Run linter
run: bundle exec standardrb
run: bundle exec standardrb

test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby_version: ['3.2', '3.3']
rails_version: [7.0.8]

name: Test Ruby ${{ matrix.ruby_version }} / Rails ${{ matrix.rails_version }}
steps:
- uses: actions/checkout@v3
- 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 dependencies
run: bundle install
env:
RAILS_VERSION: ${{ matrix.rails_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 }}
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

0 comments on commit d1d2315

Please sign in to comment.