Rails 5.1 Deprecation - update dirty methods from enabled_change to s… #307
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: Zooni CI | |
on: | |
pull_request: | |
push: { branches: master } | |
env: | |
DATABASE_URL: postgresql://talk:password@localhost/gh_ci_test | |
PANOPTES_DATABASE_URL: postgresql://talk:password@localhost/gh_ci_panoptes_test | |
jobs: | |
test: | |
name: Run Tests | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:11-alpine | |
env: | |
POSTGRES_USER: talk | |
POSTGRES_PASSWORD: password | |
ports: ['5432:5432'] | |
options: | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
continue-on-error: true | |
strategy: | |
matrix: | |
gemfile: | |
- Gemfile | |
- Gemfile.next | |
ruby: | |
- 2.6 | |
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps | |
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: Install PG Client | |
run: | | |
sudo apt-get -yqq install libpq-dev | |
- name: Setup Databases | |
run: | | |
RAILS_ENV=test bundle exec rake db:create | |
RAILS_ENV=test bundle exec rake db:schema:load | |
RAILS_ENV=panoptes_test bundle exec rake db:create | |
RAILS_ENV=test bundle exec rake panoptes:db:create_tables | |
RAILS_ENV=test bundle exec rake panoptes:db:setup | |
- name: Run tests | |
run: bundle exec rspec | |
env: | |
RAILS_ENV: test |