Skip to content

ThumbJobs

ThumbJobs #329

Workflow file for this run

name: CI
on: [push]
jobs:
linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.1
- name: Install dependencies
run: bundle install
- name: Run linter
run: bundle exec standardrb
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby_version: ['3.3']
rails_version: [7.1.3.2]
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
name: Test ${{ matrix.rails_version }}, ruby ${{ matrix.ruby_version }}
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
cache-version: 2
- name: Solr - Create container
run: docker run -d -p 8983:8983 geoblacklight/solr:8.9-v1.0.0 server/scripts/ci-start.sh
- name: Node - v20
uses: actions/setup-node@v2
with:
node-version: '20.11.0'
- 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:SolrRocks@127.0.0.1:8983/solr/admin/configs?action=UPLOAD&name=blacklight"
curl -H 'Content-type: application/json' http://solr:SolrRocks@127.0.0.1:8983/api/collections/ -d '{create: {name: blacklight-core, config: blacklight, numShards: 1}}'
- name: Install dependencies
run: bundle install
- name: Run Tests
run: |
bundle exec rake ci
env:
RAILS_ENV: test
ENGINE_CART_RAILS_OPTIONS: '--skip-git --skip-listen --skip-spring --skip-keeps --skip-coffee'
SOLR_URL: http://solr:SolrRocks@localhost:8983/solr/blacklight-core
- name: Artifacts - Upload coverage
uses: actions/upload-artifact@v2
if: always()
with:
name: coverage
path: coverage/