Dial back cron #180
Workflow file for this run
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: Ruby | |
on: [push] | |
env: | |
db_user: postgres | |
db_password: postgres | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:15 | |
env: | |
POSTGRES_USER: ${{ env.db_user }} | |
POSTGRES_PASSWORD: ${{ env.db_password }} | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Install PostgreSQL 11 client | |
run: | | |
sudo apt-get -yqq install libpq-dev | |
- name: Build app | |
run: | | |
bundle config path vendor/bundle | |
bundle install --jobs 4 --retry 3 | |
- name: Test app | |
env: | |
RAILS_ENV: test | |
POSTGRES_USER: ${{ env.db_user }} | |
POSTGRES_PASSWORD: ${{ env.db_password }} | |
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} | |
run: | | |
cp config/database.yml.github-actions config/database.yml | |
bundle exec rails db:setup | |
bundle exec rails test | |
bundle exec rails test:system |