Skip to content

Commit

Permalink
Back to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
ewlarson committed Jan 10, 2024
1 parent 1cd92af commit 86bf535
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 60 deletions.
106 changes: 47 additions & 59 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ on: [push]
jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
ruby: ['3.0', '3.1', '3.2', '3.3']
ruby: ['3.0']

services:
postgres:
Expand All @@ -29,69 +28,58 @@ jobs:
--health-retries 5

steps:
- uses: actions/checkout@v4
- name: Ruby - Set up
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- uses: actions/checkout@v2

- name: Solr - Create container
run: docker run -d -p 8983:8983 geoblacklight/solr:8.9-v1.0.0 server/scripts/ci-start.sh
- name: Ruby - Set up
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}

- name: Bundler - Install
run: gem install bundler -v 2.3.5
- name: Solr - Create container
run: docker run -d -p 8983:8983 geoblacklight/solr:8.9-v1.0.0 server/scripts/ci-start.sh

- name: Bundler - Install dependencies
run: bundle _2.3.5_ install
env:
rails_version: 7.0.8
- name: Bundler - Install
run: gem install bundler -v 2.3.5

- name: Node - v14
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Bundler - Install dependencies
run: bundle _2.3.5_ install
env:
rails_version: 7.0.8

- name: Yarn - Setup
run: exec "yarnpkg"
- name: Node - v14
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Solr - 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: Yarn - Setup
run: exec "yarnpkg"

- name: Rails - Database setup
env:
RAILS_ENV: test
run: |
bundle exec rails db:schema:load
bin/rails db:migrate RAILS_ENV=test
- name: Solr - 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: Rails - Run tests
env:
RAILS_ENV: test
rails_version: 7.0.8
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
FARADAY_VERSION: ${{ matrix.faraday_version }}
CI: true
POSTGRES_HOST: 127.0.0.1
POSTGRES_PORT: 5432
POSTGRES_DB: geoblacklight_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
DISABLE_SPRING: 1
run: |
more config/database.yml
printenv POSTGRES_DB
bundle exec rake geoportal:index:seed
bundle exec rails test:system test
- name: Rails - Database setup
env:
RAILS_ENV: test
run: |
bundle exec rails db:schema:load
bin/rails db:migrate RAILS_ENV=test
- name: Rails - Run tests
env:
RAILS_ENV: test
rails_version: 7.0.8
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
FARADAY_VERSION: ${{ matrix.faraday_version }}
run: bundle exec rake geoportal:ci --trace

- name: Artifacts - Upload coverage
uses: actions/upload-artifact@v2
if: always()
with:
name: coverage
path: coverage/
- name: Artifacts - Upload coverage
uses: actions/upload-artifact@v2
if: always()
with:
name: coverage
path: coverage/
1 change: 0 additions & 1 deletion lib/tasks/geoportal.rake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ namespace :geoportal do
task :ci do
if Rails.env.test?
success = true
`printenv`
Rake::Task['geoportal:index:seed'].invoke
system('RAILS_ENV=test bundle exec rails test:system test') || success = false
exit!(1) unless success
Expand Down

0 comments on commit 86bf535

Please sign in to comment.