set twitter images from our db or cloudinary conditionally #181
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
env: | |
RUBY_VERSION: 3.2.2 | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: postgres | |
name: Rails Tests | |
on: [push, pull_request] | |
jobs: | |
rspec-test: | |
name: RSpec | |
runs-on: ubuntu-22.04 | |
services: | |
postgres: | |
image: postgres:latest | |
ports: ["5432:5432"] | |
env: | |
POSTGRES_USER: ${{ env.POSTGRES_USER }} | |
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ env.RUBY_VERSION }} | |
- name: Install PostgreSQL | |
run: sudo apt-get install libpq-dev | |
- name: Install dependencies | |
run: | | |
gem install bundler | |
bundle install | |
- name: Setup database | |
run: | | |
cp config/database.yml.ci config/database.yml | |
bundle exec rails db:create RAILS_ENV=test | |
bundle exec rails db:migrate RAILS_ENV=test | |
- name: Run tests | |
run: bundle exec rspec spec | |