Fixed an issue that caused the enhanced_table partial to crash if no … #137
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: ez-on-rails linting and testing | |
on: [push] | |
env: | |
DOCKER_BUILDKIT: 1 | |
jobs: | |
rubocop: | |
runs-on: ubuntu-latest | |
steps: | |
# before_script | |
- uses: actions/checkout@v3 | |
- uses: ruby/setup-ruby@v1 | |
- run: bundle config set without 'development production' | |
- run: bundle install | |
# script | |
- name: run rubocop | |
working-directory: ./EzOnRails/ | |
run: rubocop | |
rspec: | |
runs-on: ubuntu-latest | |
env: | |
RAILS_ENV: test | |
POSTGRES_DB: ez_on_rails_test_test | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
services: | |
postgres: | |
env: | |
POSTGRES_DB: ez_on_rails_test_test | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
image: postgres:latest | |
ports: | |
- 5432:5432 | |
# needed because the postgres container does not provide a healthcheck | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
steps: | |
# before_script | |
- uses: actions/checkout@v3 | |
- uses: ruby/setup-ruby@v1 | |
- run: bundle config set without 'development production' | |
- run: bundle install | |
- run: cp config/database.github-actions.yml config/database.yml | |
- run: cp EzOnRails/github-actions.rspec EzOnRails/.rspec | |
- run: bundle exec rails assets:precompile | |
- run: rails db:create db:schema:load | |
# script | |
- name: run rspec | |
working-directory: ./EzOnRails/ | |
run: rspec |