tidy env vars #142
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Specs | |
on: push | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
db-test: | |
image: mariadb:5.5 | |
ports: ['3306:3306'] | |
env: | |
MYSQL_HOST: 127.0.0.1 | |
MYSQL_ROOT_PASSWORD: ABRACADABRA | |
MYSQL_PASSWORD: ABRACADABRA | |
MYSQL_DATABASE: spotlighttest | |
MYSQL_USER: roto | |
solr: | |
image: solr:6.3.0 | |
ports: ['8983:8983'] | |
env: | |
RAILS_ENV: test | |
OD_URL: https://oregondigital.org | |
URL_HOST: localhost:3000 | |
MAIL_SERVER: example.org | |
MAIL_SENDER: [email protected] | |
SOLR_URL: http://solr:8983/solr/test | |
MYSQL_HOST: 127.0.0.1 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.7.5 | |
bundler-cache: true | |
- name: Rails setup | |
run: bin/setup && bin/rails db:test:prepare | |
- name: Prep solr | |
env: | |
SOLR_ID: ${{ job.services.solr.id }} | |
run: | | |
docker exec --tty $SOLR_ID solr create_core -c test | |
- name: Run tests | |
run: bundle exec rspec spec | |