-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (50 loc) · 1.55 KB
/
continuous-integration.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---
name: Continuous Integration
on:
workflow_dispatch: # This allows to kick-off the action manually from GitHub Actions
push:
pull_request:
env:
RAILS_ENV: "test"
DATABASE_URL: "postgresql://postgres:postgres@127.0.0.1:5432/dromedary-test"
SOLR_URL: "http://127.0.0.1:9639/solr/dromedary-test"
jobs:
ci:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
strategy:
matrix:
ruby:
- '2.7.7'
services:
db:
image: postgres
env:
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
env:
BUNDLE_RUBYGEMS__PKG__GITHUB__COM: ${{secrets.GH_PACKAGE_READ_TOKEN}}
- name: Run Solr (and create core)
run: docker run -d -p 9639:8983 -v $(pwd)/solr/dromedary:/dromedary:ro ghcr.io/mlibrary/dromedary/dromedary-solr:latest solr-precreate dromedary-test /dromedary
- name: Yarn Install
run: yarn install
- name: Setup Database (db:setup)
run: bundle exec rake db:setup
- name: Continuous Integration (standard, spec)
run: bundle exec rake