Skip to content

Create 20241120238823_rename_references_to_distributions.rb #627

Create 20241120238823_rename_references_to_distributions.rb

Create 20241120238823_rename_references_to_distributions.rb #627

Workflow file for this run

name: CI
on: [push]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ['3.3']
rails_version: [7.0.8]
services:
postgres:
image: postgres:latest
env:
POSTGRES_HOST: 127.0.0.1
POSTGRES_PORT: 5432
POSTGRES_DB: geoblacklight_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
# Set health checks to wait until postgres has started
options:
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Ruby - Set up
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- 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
run: gem install bundler -v 2.3.5
- name: Bundler - Install dependencies
run: bundle _2.3.5_ install
env:
RAILS_VERSION: ${{ matrix.rails_version }}
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Yarn - Setup
run: exec "yarnpkg"
- 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 - Database setup
env:
RAILS_ENV: test
POSTGRES_HOST: 127.0.0.1
POSTGRES_PORT: 5432
POSTGRES_DB: geoblacklight_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
run: |
bundle exec rails db:schema:load
bin/rails db:migrate RAILS_ENV=test
- name: Rails - Run tests
env:
RAILS_ENV: test
RAILS_VERSION: ${{ matrix.rails_version }}
RUBYOPT: W0
SOLR_URL: http://solr:SolrRocks@localhost:8983/solr/blacklight-core
FARADAY_VERSION: ${{ matrix.faraday_version }}
POSTGRES_HOST: 127.0.0.1
POSTGRES_PORT: 5432
POSTGRES_DB: geoblacklight_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
BLAZER_DATABASE_URL: postgresql://postgres:[email protected]:5432/geoblacklight_test
run: |
bundle exec rake geoportal:ci --trace
- name: Artifacts - Upload coverage
uses: actions/upload-artifact@v4
if: always()
with:
name: coverage
path: |
coverage/
tmp/screenshots/